SYNTAX: IF Statement with OR modifier? | Community
Skip to main content
RandyRoberts
Community Advisor
Community Advisor
June 23, 2021
Solved

SYNTAX: IF Statement with OR modifier?

  • June 23, 2021
  • 2 replies
  • 1068 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Doug_Den_Hoed_AtAppStore

Hi Randy,

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

Regards,

Doug

2 replies

Doug_Den_Hoed_AtAppStore
Community Advisor
Doug_Den_Hoed_AtAppStoreCommunity AdvisorAccepted solution
Community Advisor
June 23, 2021

Hi Randy,

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

Regards,

Doug

RandyRoberts
Community Advisor
Community Advisor
June 24, 2021

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!