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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

set a variable

Hello

I got a list box for Promotion Types

I don't want when the user select a promotion type to filter data so I gave the list box an alternate state

Now I want when the user select a promotion type to set a variable called vPromotion

I added a trigger to the field Prmotiontype to (External->Set Variable)yet the variable is not being set

Please advise

I can walk on water when it freezes
4 Replies
jagannalla
Partner - Specialist III
Partner - Specialist III

AliHijazi,

I didn't get what you said. If i understood when user selects PromotionTypes this selection should not effect the other charts then you can go through the set analysis. ie. Sum({<PromotionTypes=>}Value).

If you want to store the selected values of promotion type in vPromotion variable then just add expression to varaible =GetFieldSelection(PromotionTypes,',','*')

Let me know if i'm wrong. I'll try to help you.

Hope it helps you

Cheers!

Jagan

ali_hijazi
Partner - Master II
Partner - Master II
Author

Yes this is what I want

but the variable doesn't get set unless I remove the alternate state on the PromotionTypes; something I don't want I need to add the alternate state to the PromotionTypes

I can walk on water when it freezes
jagannalla
Partner - Specialist III
Partner - Specialist III

Untitled.png

No it will work even if you check show alternative. Please see the attached image.

Not applicable

I guess , Suppose you have cretaed a variable "myvar" for selected values of "Promotion Types"  of "Alternative state1"

and you are using the variable value in a chart/Text object, then you have to keep the same alternative state i.e "Alternative state1" for the chart then only variable wil result the slected value.