Forum Discussion
Anonymous
3 years agoNot applicable
"Nested" if struggle
I'm struggling to create an If with a desired end result of "Yes" or "No"
We have 4 categories to test for in a text field,
"" (i.e. blank)
[Fred Flintstone: 31/03/2022]
a character string that contains "deleted or reassigned"
a character string that does not contain "deleted or reassigned"
For the first 3 tests I would expect a result of "No" and "Yes" on the last test. Fred Flintstone is a testing name, not a real employee, we've moved on from the stone age 🙂
The IF statement I came up with is as follows, but keeps giving an error advising too few arguments for the If, but I can't see what's wrong with it
RejectedLine = IF(TableName[TextField]="" ||
IF(SEARCH("]",TableName[TextField],,0)=LEN(TableName[TextField]) ||
IF(CONTAINSSTRING(TableName[TextField],"deleted or reassigned")),
"No","Yes"))
Any help gratefully received
Regards
Fred
Anonymous Try:
RejectedLine = IF(TableName[TextField]="" || SEARCH("]",TableName[TextField],,0)=LEN(TableName[TextField]) || CONTAINSSTRING(TableName[TextField],"deleted or reassigned"), "No","Yes")
2 Replies
- AnonymousNot applicable
Greg_Deckler perfect, of course, no need for the multiple "IF", this isn't Excel 🙂
RThanks and regards
Fred
- Greg_Deckler
Community Champion
Anonymous Try:
RejectedLine = IF(TableName[TextField]="" || SEARCH("]",TableName[TextField],,0)=LEN(TableName[TextField]) || CONTAINSSTRING(TableName[TextField],"deleted or reassigned"), "No","Yes")