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

Action and Triggers in Select Field

Hi ,

Can someone help me in solving below concerns:

1.Can we select multiple fields in select field options under trigger.

I want to select  5 Countries from list of 10 and  4 Companies from list of 15 at a time for one tab

Also this must be cleared if I moved to other tabs.

2.I have two different sources each has year,country,state in it

One is taken as Year,Country,state and other as Cyear , C COUNTRY,CSTATE .In some tabs its Year and some tabs its Cyear, So when we select year,Country,state in relavent tab and if other tabs previous selected with Cyear,ccountry then it  should not  reflect in selection list.

How to clear the filter should I use clear field or clear all

4 Replies
MK9885
Master II
Master II

Not exactly a solution but a workaround.....which you can try

For 1st point you can create a new field in backend using if condition for 5 countires...

Ex: if(Country='USA',Country, if(Country='Germany',Country and so on....)) as TriggeredCountries

Do the same for Companies.

then in frontend for sheet properties, use Triggers>OnActivateSheet>Edit actions>Select Possible> in field enter TriggeredCountries

then Triggers>OnLeaveSheet>Edit actions>ClearAll


For 2nd point Create alternate states, Settings>General>Alternate states


Use that alternate state for your separate CYear and CCountry Filters and use that same state for your CYear, CCountry charts


vishsaggi
Champion III
Champion III

If you can share some sample data we can work and post it here. You can create sheet level triggers too.

1.

Ctrl+Alt+S -> Triggers -> Action -> Select in Field and add the field name and your countries.

(USA|UK|INDIA|AUS)

same for Company

(CompName1|CompName2|Compname3)

2.

As Aehman suggested use Alternate States from Document properties and create States on these fields.

Once created use these State names and select them in their respective list boxes and charts. Like here

Capture1.PNG

Capture2.PNG

Can you also show us your data model how it looks?

kvr9
Creator
Creator
Author

Hi ,

Thank you for your response.

I was not able to define the alternate state,Can you please give example with my data.

The scenario is as below two different data in different tabs but when I select respective columns in related tabs the data it is reflecting in selection box.The selection need to restricted to that data tabs only it should not seen in other data tabs.test3.PNG

Please find the sample qvw

vishsaggi
Champion III
Champion III

Check attached is this what you are looking?

If you go to Document Properties -> Alternate State button you see two states. So if you add these states in different objects of your sheet it will not reflect. However, when your column names are different the data is different with other columns so selections will be default to their respective fields.

Anyways, if you right click on any objects go to properties and General tab there you can see the State selected.