Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to pass values in a variable

I need to show a list box with values Weekly , Monthly

If the user selects Weekly then I need to execute a set of conditions and if the user selects monthly then another set of conditions need to be executed.

I wanted to create single variable that will accept weekly and monthly values and then use a nested if to execute these conditions.

What i cant figure out is how to create this varibale in a script to take weekly and monthly values and how to create a listbox around it?

Any ideas on this are most welcome!!!

1 Solution

Accepted Solutions
prieper
Master II
Master II

If a listbox is required you may load an island table in your script

IntervalSelector: LOAD * INLINE [Interval

Monthly

Weekly];

and choose "Only one selected value".

All conditions then may refer to these fields:
PICK(MATCH(Interval, 'Monthly', 'Weekly'), condition month, condition week)

Similarly you may work with variable an then an inputbox, where entry is retricted to just these two values...


HTH Peter

View solution in original post

2 Replies
prieper
Master II
Master II

If a listbox is required you may load an island table in your script

IntervalSelector: LOAD * INLINE [Interval

Monthly

Weekly];

and choose "Only one selected value".

All conditions then may refer to these fields:
PICK(MATCH(Interval, 'Monthly', 'Weekly'), condition month, condition week)

Similarly you may work with variable an then an inputbox, where entry is retricted to just these two values...


HTH Peter

Anonymous
Not applicable
Author

Thanks Peter.. I will use this suggestion