Implemented

Add nested 'if' statement into expressions in LW.net

Can you please add a nested 'if' statement into the expressions in LW.net imports/exports? Currently, the 'if' functionality works if there are only 2 'if' clauses:



iif[c, a, b] - where 'c' is the condition and must evaluate to a Boolean. The value 'a' is returned if 'c' is true, otherwise, the value 'b' is returned.



However, if we have more than 2 conditions, we are not able to use this function. We tried to nest an 'if' condition into 'b' but LW.net can't evaluate it since it's surrounded with double quotes and count it as a string.

1 person likes this idea
It can already be done. You have to use variables to achieve this.

Example:

a:=iif[v{RetailPrice}>1, True, False];
b:=iif[v{RetailPrice}>2, True, False];
iif[a=true AND b=true, True, False]

Login to post a comment