Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

dmelillo
Contributor II

Use Trigger To Select Field Value if Only One Field Value is Displayed

Here is the scenario: Some of our users are assigned to specific SEGMENTS in section access. I want to program a trigger so if one SEGMENT value is being displayed, that SEGMENT value is selected in the actual SEGMENT field. Currently, section access limits the user's view to only their segment, but certain hidden listboxes do not display unless the SEGMENT value is selected.

Any suggestions?

Thank you.. - dave

3 Replies

Re: Use Trigger To Select Field Value if Only One Field Value is Displayed

Why not change the display condition expressions instead? No need to muck about with triggers and actions. Something like =If(getpossiblecount(SEGMENT)=1,1,0)


talk is cheap, supply exceeds demand
dmelillo
Contributor II

Re: Use Trigger To Select Field Value if Only One Field Value is Displayed

Gysbert - Took your advice and amended but that didnt work ... In the conditional I have below. The idea is that if the user has the CANDY as their SEGMENT in section access the SEGMENT field would then be set to CANDY upon opening and the list box would be displayed without them having to click CANDY in a separate SEGMENT listbox

=If(getpossiblecount(SEGMENT)=1,1,0)

AND

GetFieldSelections(SEGMENT) = 'CANDY'

Re: Use Trigger To Select Field Value if Only One Field Value is Displayed

Try =If(only(SEGMENT) = 'CANDY' ,1,0)


talk is cheap, supply exceeds demand
Community Browser