My expression is not working can someone please explain what I am doing wrong.
if Contains([Building], "15") then "15"
Elseif contains ([Building], "48A") then "48A"
Elseif contains ([Building], "48B") then "48B"
Elseif contains ([Building], "48C") then "48C"
Elseif contains ([Building], "77") then "77"
Elseif contains ([Building], "87") then "87"
Elseif contains ([Building], "88") then "88"
Elseif contains ([Building], "98A") then "98A"
Elseif contains ([Building], "98B") then "98B"
ELSE 'Invalid'
ENDIF
I don't see anything wrong with the syntax. Can you share some sample data that demonstrates the issue?
Your expression syntax is fine ...unless you are trying to create a new column and trying to assign an incorrect datatype?
Hi Luke,
Thank you for confirming the expression is correct. I reran the WF and I received no new error.
Hi @lynettejackson ,
The if syntax is correct.
Two possible hypotheses for your error message: Either You have not given the name of the column to create (it must be specified in the kind of drop-down list which is just above the word if in the capture below).
Either you have indicated this output column and this column is of numeric type but since the results of your condition are strings, this returns an error.
Do you find yourself in one of the cases?
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |