on 02-11-2010 8:41 PM
if {SOP10100.SOPTYPE} in [3, 4] then
{SOP10200.QUANTITY}
else
0
Does "in(3,4) mean that if the value of SOP10100.SOPTYPE is 3 or 4 ?
in crystal syntax,
if {field} in [3,4] then
{otherfield} else 0
Would mean that if the value of is exactly 3 or 4 then the result is and in all other cases it is 0.
i believe that you must use these [] types of brackets, not () or {}. Also, if it is a string field, not a number, your values would have to be entered like this ['3','4'].
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes the IN function means if the tested value is one of the possible values
for example
if 1 in [1,2] then
"in"
else
"not in"
will result in the word in being displayed because the tested value 1 is one of the possible values 1 OR 2
The square brackets [ ] surround the list of possible values
You can also do this
if "abc" in "abcdefgh" then
"in string"
else
"not in string"
Look in the help index for IN
Best regards
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.