Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Field OnChange Trigger

I'm probably just over-thinking this, but I can't seem to make this work. I have a ListBox for a field called "Data Set" that allows the user to limit the data (from a large concatenated fact table) displayed in chart objects. There are only three options. The users can select any one of the values or the first two values at the same time. BUT...the third option can only be selected by itself. So I'm trying to get this trigger to detect if that third option has been selected and, if so, unselect the first two options (if either have been selected). Conversely, if either or both of the first two options is selected, the third is unselected. I hope that makes sense.

2014-08-20_131439.jpg

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author


modify the expression in my above post to the following (note the extra * in wildmatch and the 4 double quotes i added in the second part of the expression)

=if(WildMatch(GetFieldSelections([Data Set]),'*Operator*'),('Operator Sales'),'("'&SubField(replace(getcurrentselections([Data Set]),', ', '"|"'),': ',2)&'")') 

View solution in original post

14 Replies
ecolomer
Master II
Master II

Hi,

I would propose the following idea:

First would group the first two options in a group on a list might only if the second choice is selected (previously third) group (now first choice) would no longer be selected. On the other hand if you select the group would open another list of options with the first two current

Do not know if I have explained and if it helps anything?

Saludos,

Enrique

ecolomer
Master II
Master II

An example

Anonymous
Not applicable
Author

Thanks for the example. Not exactly what I'm after but workable if I can't figure out the trigger solution.

Anonymous
Not applicable
Author

Document properties > Field Event Triggers > select "Data Set" (assuming that is your field name as shown in your post) > click Add actions for OnSelect > add Selection action to Select in Field > input [Data Set] for field name > input the following expression for Search String


=if(WildMatch(GetFieldSelections([Data Set]),'Operator*'),('Operator Sales'),'('&SubField(replace(getcurrentselections([Data Set]),', ', '|'),': ',2)&')') 

Anonymous
Not applicable
Author

That's really close jsaradhi. But it doesn't allow either of the first two options to be selected.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this link hope it helps you.

Select in Field Trigger with Single or Multiple values

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi,

In your case it is

=if(WildMatch(GetFieldSelections([Data Set]),'Operator*'),('Operator Sales'),'("' & GetFieldSelections([Data Set], '"|"') & '")')


Hope this helps you.


Regards,

Jagan.

Anonymous
Not applicable
Author


modify the expression in my above post to the following (note the extra * in wildmatch and the 4 double quotes i added in the second part of the expression)

=if(WildMatch(GetFieldSelections([Data Set]),'*Operator*'),('Operator Sales'),'("'&SubField(replace(getcurrentselections([Data Set]),', ', '"|"'),': ',2)&'")') 

Anonymous
Not applicable
Author

Thanks jsaradhi! That seems to be working as I need it to.