Hi, I'm creating an automated tagging process based on criteria users select when submitting fields. The problem is that the instructions IF(CONTAINS( .... is too broad. When someone selects Wholesale and Retail Brokers,for example, WF delivers both abbreviations WBC_and WB, and it should only deliver WBC_ I need to change the code to include one of the fields, but to exclude a similar field
IF(CONTAINS("All Brokers", {DE:CS - GRS Audience}),"ALL_"),
IF(CONTAINS("Customers", {DE:CS - GRS Audience}),"CUST_"),
IF(CONTAINS("Internal", {DE:CS - GRS Audience}),"INT_"),
IF(CONTAINS("Retail Broker", {DE:CS - GRS Audience}),"RB_"),
IF(CONTAINS("Retail Broker and Customer", {DE:CS - GRS Audience}),"RBC_"),
IF(CONTAINS("Wholesale and Retail Brokers", {DE:CS - GRS Audience}),"WBC_"),
IF(CONTAINS("Wholesale Broker", {DE:CS - GRS Audience}),"WB_"),
I'd appreciate any help you can provide. Thank you!
Peggy
Solved! Go to Solution.
Views
Replies
Total Likes
Thank you, I did suggest the alternative code to the WF consultant, but he explained that he didn't think that would work. He had a reason but I don't want to try to explain it here in case I get it wrong. I may go back and double check though. His recommendation was a nested If statement using this as an example. Replace the two lines with the retail broker to this:
IF(CONTAINS("Retail Broker and Customer", {DE:CS - GRS Audience}),"RBC_", IF(CONTAINS("Retail Broker", {DE:CS - GRS Audience}),"RB_")),
which I couldn't get to work correctly each time so in the end I slightly edited the name of the fields to eliminate any duplicate words. Even changing the casing was a small enough change to solve my problem.
Thanks for your input.
Peggy
Views
Replies
Total Likes
If all the options are exactly as shown I would advise you to trade in a condition operator for your “contains”. See this link for more details.
Something like IF({DE:CS - GRS Audience}="Retail Broker", "RB_", … might have worked better.
Your other option would be to make the retail broker option more unique, e.g. “Retail broker only”.
Views
Replies
Total Likes
Thank you, I did suggest the alternative code to the WF consultant, but he explained that he didn't think that would work. He had a reason but I don't want to try to explain it here in case I get it wrong. I may go back and double check though. His recommendation was a nested If statement using this as an example. Replace the two lines with the retail broker to this:
IF(CONTAINS("Retail Broker and Customer", {DE:CS - GRS Audience}),"RBC_", IF(CONTAINS("Retail Broker", {DE:CS - GRS Audience}),"RB_")),
which I couldn't get to work correctly each time so in the end I slightly edited the name of the fields to eliminate any duplicate words. Even changing the casing was a small enough change to solve my problem.
Thanks for your input.
Peggy
Views
Replies
Total Likes
Views
Likes
Replies