6 Replies Latest reply: May 5, 2014 3:07 PM by Bernd Bieker RSS

    Problem using variable in List Box expression.

      Hi all,

      I tried to find a solution in existing discussions but were not successful.


      I have a ListBox defined containing years 2014, 2015, 2016.

      If I use the following function:

      = If(SubStringCount(GetFieldSelections(_year_listbox),'2014')=1,1,0)


      the result is as expected, i.e. if the checkbox '2014' is marked I get a '1', of not a '0'.

      Since I want to use the result, I want to set a variable to this '1' or '0' accordingly.

      But if I change the expression to:


      _definedvar = If(SubStringCount(GetFieldSelections(_year_listbox),'2014')=1,1,0)

       

      the result is '1' if the 2014 checkbox is not selected and '0' if it is selected.

      What needs to be done that the _definedvar is set to '0' or '1' depending on the 2014 checkbox?

       

      Thanks a lot!