Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have records that can have two conditions I or V
I have a listbox with three choices :
I
V
I and V
I store the choice in a variable that I want to use in set analysis
First two choices are easy 🙂 but how do I have to store the third option so I can use it in set analysis.
I tried something like Vchoice= 'V|I' but that does not work
using Field={'I','V'} will bring up any rows with either of these two values some with only I and some with only V. to get both this is one way:
{<Field=p({<IVField={'V'}>}Field)>*<Field=p({<IVField={'I'}>}Field)>} this ensures only one with both I and V
so you can create 2 variables one for I and one for V (driven by selection):
vI if selection = I or I and V '{' & chr(39) & 'I' & chr(39) & '}'
vV if selection = V or I and V'{' & chr(39) & 'V' & chr(39) & '}'
and you expression will be:
{<Field=p({<IVField=$(vV)>}Field)>*<Field=p({<IVField=$(vI)>}Field)>}
if user selects the third option both variables should be set, i user only select 1, the other should be set to empty string which is evaluated as:
{<Field=p({<IVField={'I'}>}Field)>*<Field=p({<IVField=>}Field)>} if user selects only I.
@curiousfellow try below expression in variable
=concat(distinct chr(39) & listboxfield & chr(39), ',')
using Field={'I','V'} will bring up any rows with either of these two values some with only I and some with only V. to get both this is one way:
{<Field=p({<IVField={'V'}>}Field)>*<Field=p({<IVField={'I'}>}Field)>} this ensures only one with both I and V
so you can create 2 variables one for I and one for V (driven by selection):
vI if selection = I or I and V '{' & chr(39) & 'I' & chr(39) & '}'
vV if selection = V or I and V'{' & chr(39) & 'V' & chr(39) & '}'
and you expression will be:
{<Field=p({<IVField=$(vV)>}Field)>*<Field=p({<IVField=$(vI)>}Field)>}
if user selects the third option both variables should be set, i user only select 1, the other should be set to empty string which is evaluated as:
{<Field=p({<IVField={'I'}>}Field)>*<Field=p({<IVField=>}Field)>} if user selects only I.