Expressions in Datashuttle have mixed results
We have a workflow in Datashuttle with the following under Expressions.
Submission Type - =IF(CONTAINS("A", Comments@row), "Tivity Add", IF(CONTAINS("T", Comments@row), "Tivity Term", IF(CONTAINS("C", Comments@row), "Tivity Change")))
The idea is that if a line comes in and it's an Add, Term or Change, smartsheet will designate that line appropriately under "submission Type" for reporting.
For several months, this was working perfectly, then all of a sudden the all "C" changes were being classified as "adds" instead.
This last time, some were right and some were wrong so I'm doubly confused.
The expression is looking at 1 column called "Comments." staff puts in more text than just a A, T or C. I stripped out all the text except C and this is still happening.
Is the solution to only have an A, C or T in that column? We can do that but I still wonder why it worked for so long, then didn't.
Thank you
Answers
-
CONTAINS is not case sensitive. Looking for "A" using a CONTAINS function will flag true for both "A" and "a'. This means the "a" in "update" is triggering the first IF as true which outputs "Tivity Add" and then stops evaluating since it found a true value as is normal for a nested IF.
If you need it to be case sensitive, you have to use a FIND function. If the first letter will always be the indicator, you could also use the LEFT function to pull only the very fist letter of the comment in for evaluation.
-
Ok, thank you!
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives