I am unable to get the valid building rooms with the Contain statement. I am looking for 48A,48B,48C,48U,77,87,87B,98A,98B is valid else invalid type statement.
Contains([OS: Building],48A,48B,48C,48U,77,87,87B,98A,98B)
Solved! Go to Solution.
those are strings. try:
if [Building] in ("48A","48B","48C","48U","77","87","87B","98A","98B") then "valid" else "invalid" endif
In your case the full logic is probably
formula tool - new column Valid
if [Building] in ("48A","48B","48C","48U","77","87","87B","98A","98B") then "valid" else "invalid" endif
Contains is also 1 argument compared to 1 argument. In - looks at a full list.
Here is a slightly different approach. This uses an input table and a join to filter the valid buildings, etc. @apathetichell 's approach is simpler and spot-on. The approach depicted here might be useful if you expect the list to change or significantly expand.