Expand my Community achievements bar.

SOLVED

Possible to Combine Multiple AND/ORs in an IF Statement

Avatar

Community Advisor

I'm trying to create a text mode column that combines the && operator with the OR operator for multiple options. Anyone know if it's possible to combine them? 

 

This is what I'm trying to get in the simplest way possible and right now my expression is a little overwhelming. KellieGardner_0-1697479850431.png

 

If the project status is A, B, OR C AND condition is At Risk OR In Trouble, True Text, False Text

 

 




Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Thanks @cverges-medallia - that got my wheels spinning for sure on ideas. Luckily I stumbled upon this old thread: https://experienceleaguecommunities.adobe.com/t5/workfront-questions/syntax-if-statement-with-or-mod... and used it to come up with something a little simpler in terms of ORs, &&s and IFs. Not sure if it's the most simplified but certainly easier to manage and troubleshoot from what I was working with before.

 

IF({condition}="AR"||{condition}="IT",IFIN({status},"AAA","BBB","CCC","True text","False text for not meeting both criteria")"False text for not meeting condition criteria")

 

I tried to combine 2 IFIN statements but couldn't get it to work. Not sure if that's an option I'm just missing some formatting?




View solution in original post

2 Replies

Avatar

Level 6

We do this with our API queries and Fusion conditionals all the time:

A,B,C cicontains project.status && Risk,Trouble cicontains condition

This is a type of trick for both handling boolean logic and array searching.  It's not the best -- I'd much prefer Workfront to have proper boolean condition support, but it's a thing that can be done.

I'm not sure whether Workfront reporting can handle this. 

Avatar

Correct answer by
Community Advisor

Thanks @cverges-medallia - that got my wheels spinning for sure on ideas. Luckily I stumbled upon this old thread: https://experienceleaguecommunities.adobe.com/t5/workfront-questions/syntax-if-statement-with-or-mod... and used it to come up with something a little simpler in terms of ORs, &&s and IFs. Not sure if it's the most simplified but certainly easier to manage and troubleshoot from what I was working with before.

 

IF({condition}="AR"||{condition}="IT",IFIN({status},"AAA","BBB","CCC","True text","False text for not meeting both criteria")"False text for not meeting condition criteria")

 

I tried to combine 2 IFIN statements but couldn't get it to work. Not sure if that's an option I'm just missing some formatting?