Expand my Community achievements bar.

SOLVED

How do I add another status to this project collection expression?

Avatar

Community Advisor

I'm working on a program report and want to add a column for active projects. I am 75% of the way there but need to edit my collection text mode to also include when a project's status is in Planning (PLN)

 

displayname=Current Projects
listdelimiter=<div>
listmethod=nested(projects).lists
textmode=true
type=iterate
usewidths=true
valueexpression=IF(CONTAINS('CUR',{status})=false," ",CONCAT({name},' : ',{owner}.{name}))
valueformat=HTML
width=300
Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Monique,

Your approach is the culprit here as CONTAINS isn't the most efficient way to get this info. Also, your parens weren't in the right place.

 

 

 

 

displayname=Show Owner if Planning or Active
listdelimiter=<div>
listmethod=nested(projects).lists
textmode=true
type=iterate
valueexpression=IF({status}="CUR" || {status}="PLN",CONCAT({name}," : ",{owner}.{name})," ")
valueformat=HTML

 

Use the || operator to indicate that the condition is fulfilled when the expression finds either the first or the second value of your statement.

For example, use the following statement in a calculated custom field to build an “IF” statement that marks projects in either the Current or Planning statuses as “Active”:

IF({status}=”PLN”||{status}=”CUR”,”Active”,”Not Active”)

TIP: if this solved your problem, I invite you to consider marking it as a Correct Answer to help others who might also find it of use.
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/mysocalledideas

 

View solution in original post

4 Replies

Avatar

Community Advisor

Hi there! I'm pretty sure you'd add another IF within the statement you have so you're expression looks for projects in Current and Planning. This is the structure for combining IF statements:

IF(Condition1,True Expression,IF(Condition2,True Expression,False Expression))

Does this work for you?

valueexpression=IF(CONTAINS('CUR',{status})=false," ",CONCAT({name},' : ',{owner}.{name}),IF(CONTAINS('PLN',{status})=false," ",CONCAT({name},' : ',{owner}.{name})))

 

 

If this helped you, please mark correct to help others : )

Avatar

Community Advisor

Thanks, Madalyn. Unfortunately, that doesn't work and I only see the Current projects.

Avatar

Correct answer by
Level 10

Hi Monique,

Your approach is the culprit here as CONTAINS isn't the most efficient way to get this info. Also, your parens weren't in the right place.

 

 

 

 

displayname=Show Owner if Planning or Active
listdelimiter=<div>
listmethod=nested(projects).lists
textmode=true
type=iterate
valueexpression=IF({status}="CUR" || {status}="PLN",CONCAT({name}," : ",{owner}.{name})," ")
valueformat=HTML

 

Use the || operator to indicate that the condition is fulfilled when the expression finds either the first or the second value of your statement.

For example, use the following statement in a calculated custom field to build an “IF” statement that marks projects in either the Current or Planning statuses as “Active”:

IF({status}=”PLN”||{status}=”CUR”,”Active”,”Not Active”)

TIP: if this solved your problem, I invite you to consider marking it as a Correct Answer to help others who might also find it of use.
If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/mysocalledideas

 

Avatar

Community Advisor

You're my hero!! In all my years I've never needed to use an IF || statement.

 

Also your upvote link is genius