Expand my Community achievements bar.

SOLVED

SYNTAX: IF Statement with OR modifier?

Avatar

Community Advisor

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
Community Advisor

Hi Randy,

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

Regards,

Doug

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi Randy,

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

Regards,

Doug

Avatar

Community Advisor

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!