How to check if an attributes value is in an array of other values?

1
In a decision, I want to check if an attribute's value is contained in a whole list of separate (String) values, which can be as long as 30 or 40 values, without having to resort to separate OR-statements checking every individual possibility. So I would like this: $Instance/Attribute = '0428' or $Instance/Attribute = '0430' or $Instance/Attribute = '0431' or $Instance/Attribute = '0433' or $Instance/Attribute = '0434' or $Instance/Attribute = '0435' or $Instance/Attribute = '0439' or $Instance/Attribute = '0446' or $Instance/Attribute = '0449' to be something like this: $Instance/Attribute = [ "0428" , "0430" , "0431" , "0433" , "0434" , "0435" , "0439" , "0446" , "0449" ] Is that at all possible?
asked
1 answers
0

Got it.

I now use the find() function to see if it returns a position greater then -1. If so, then the decision returns true, else it returns false.

if find ( '0101, 0104, 0105, 0106, 0107, 0108, 0109, 0110, 0111, 0114,
           0115, 0120, 0122, 0130, 0202, 0203, 0205, 0206, 0207, 0208,
           0209, 0213, 0214, 0220, 0221, 0222, 0223, 0224, 0225, 0226,
           0227, 0228, 0229, 0230, 0231, 0232, 0233, 0234, 0235, 0236,
           0237, 0241, 0242, 0243, 0244, 0245, 0246, 0248, 0249, 0250,
           0301, 0302, 0303, 0304, 0305, 0307, 0308, 0309, 0313, 0314,
           0320, 0321, 0322, 0350, 0360, 0400, 0401, 0402, 0403, 0404,
           0405, 0410, 0411, 0415, 0416, 0419, 0420, 0421, 0422, 0425,
           0426, 0427, 0429, 0432, 0436, 0437, 0438, 0440, 0441, 0443,
           0445, 0447, 0448, 0450, 0481, 0482, 0483, 0484, 0485, 0487,
           0488, 0489, 0490, 0491, 0492, 0493, 0494, 0495, 0499, 0501,
           1256', $Instance/Attribute ) > -1
then true
else false

 

answered