Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable vDashboard that is either 0 or 1 (I have a button that toggles this). If it is 0, I want the user to be able to make selections in a list box from the complete dataset. However, if it is 1, I want to limit the available selections. In both cases, the user can only select one of the values.
For example: my dataset has a field called Division with values A, B, C, D, E, F. If vDashboard = 0, the listbox shows A,B,C,D,E,F as available for selection. However, if vDashboard = 1, I want the list box to only show B,C,F as available for selection.
I've added another field in my dataset call is (Dash) that has a 1 for any rows of data where Division in (B,C,F), so I can use that field to define the subset of available selections. I could also envision doing this through a variable in my load statement.
How do I limit the selections available in the list box based on vDashboard?
Hi,
create variable then take two button and
first button add action set variable value 0
second button add action set variable value 1
then take listbox object and select last option Expression
and write below expression
if(vDash=0,division,
if(vDash=1,Pick(Match(division,'B','C','F'),'B','C','F'))).
it is working fine and may be helpful to you
Regards,
Nitin.
If you can use a field instead of a variable, I would create a link table in your script like this
LOAD * INLINE [
Division, Dashboard
A, 0
B, 0
C, 0
D, 0
E, 0
F, 0
B, 1
C, 1
F, 1
];
Once you do this... selection of 0 in Dashboard will show all Division, but selection of 1 will only give B, C, and F
Hi,
create variable then take two button and
first button add action set variable value 0
second button add action set variable value 1
then take listbox object and select last option Expression
and write below expression
if(vDash=0,division,
if(vDash=1,Pick(Match(division,'B','C','F'),'B','C','F'))).
it is working fine and may be helpful to you
Regards,
Nitin.