Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

help with alternate state trigger

hi all,

i have an on activate sheet trigger which takes the selections from a list box on sheet 1 and applys it to a list box on sheet 2.

both sheets are in different alternate states.

The trigger only seems to work if 1 value is selcted, if i select multiple values then nothing is passed to the other list box.

Does anyone know how i can get this to work for any value selected? apart from when there is nothing selected, i dont want anything passed if nothing is selected.

i have attached an example.

Thanks in advanced

9 Replies
ramoncova06
Partner - Specialist III
Partner - Specialist III

try by adding this to your trigger

='(' & Concat(DISTINCT  [Dim 1], '|') & ')'

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, thanks, that works for multiple selections, but when there's no selections made it carries all possible selections over instead. i don't want it to do that.

I have tried adding an if statement to the trigger but i cant seem to get the state to work within the if statement.

i have added a text box with the getselectedcount of the field in state2 but it seems to only pick up the default state..

see updated example attached.

Anonymous
Not applicable

Try something like this for your GetSelectedCount() for your State2 :

     =GetSelectedCount ( [Dim 1] , 0  ,  'State2' )

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

i am getting an error in expression error.

am i right in thinking that the 3rd paramter of getselectedcount is only available in 11.2SR8 and above?

i am on SR5 and the client that this is for is on SR4.

I don't think they will upgrade just to get this working..

Anonymous
Not applicable

Unfortunately I think you are correct, as in did come out post SR5.

ramoncova06
Partner - Specialist III
Partner - Specialist III

see if this works for you

I switched the trigger to document side instead of sheet

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, thanks, that seems to work. i have already changed my approach though and i have gone through each object and told each expression to ignore certain fields instead of using alternate states .

thanks

ramoncova06
Partner - Specialist III
Partner - Specialist III

Glad it worked

ecolomer
Master II
Master II

Here you have an example