Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit is happening now. Discover what's next in customer experience.
SOLVED

SYNTAX: IF Statement with OR modifier?

Avatar

Level 10

I have a column (in a project report) that lists the current task(s). Thanks to @Doug Den Hoed‚, via WF-Pro for providing this in another thread.

This IF statement (by WF-Pro) accounts for a task that contains the "CPL" status.

valueexpression=IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL",{status}),"",CONCAT({name}," "))))

We also sometimes use a custom status "Waived" with the "FLG" key.

So I tried this:

IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL"||"FLG",{status}),"",CONCAT({name}," "))))

after CPL, I put "OR "FLG". no luck.

So I tried this:

IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL",{status}||"FLG"{status}),"",CONCAT({name}," ")))). nope, not that either.

I even tried this:

IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("CPL",{status}),"",IF({numberOfChildren}=0,IF({canStart},IF(CONTAINS("FLG",{status}),"",CONCAT({name}," ")))))). ugh, why can't I figure this out?

I also tried this format:

IF(Status="CPL"||Status="FLG", to no avail.

Can someone tell me how to put an OR modifier in a multi-IF statement?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Randy,

May I present: IFIN (very handy, if you've not yet met).

Regards,

Doug

0 Replies

Avatar

Correct answer by
Level 10

Hi Randy,

May I present: IFIN (very handy, if you've not yet met).

Regards,

Doug

Avatar

Level 10

Thank you Doug! (Again)

I know you told me about that once but I didn't have an application for it so I guess my brain deleted it.

Here's code that works:

valueexpression=IF({numberOfChildren}=0,IF({canStart},IFIN({status},"CPL","FLG","",CONCAT("• ",{name}," "))))

listdelimiter=<p>

listmethod=nested(tasks).lists

valueformat=HTML

displayname=Current Task

textmode=true

type=iterate

I sure wish we had a code formatter on the formatting bar!