Text mode to only show fields where the Tasks parentID = spaces/isnull | Community
Skip to main content
Level 3
August 7, 2023
Solved

Text mode to only show fields where the Tasks parentID = spaces/isnull

  • August 7, 2023
  • 1 reply
  • 1052 views

How can I wrap an IF statement around the below, where I only show fields where the Tasks parentID = spaces/isnull?

 

displayname=TEST - Active Stages
listdelimiter=<div>
listmethod=nested(tasks).lists
textmode=true
type=iterate
valueexpression=IF(ISBLANK({DE:Stage - Task Level}),"",{DE:Stage - Task Level})
valueformat=HTML

Basically, I only want to show {DE:Stage - Task Level} for the Parent Tasks.

Thanks in advance!

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 Heather_Kulbacki

@dabell 

I'd probably do a nested IF statement that first looks for tasks that don't have a parent (parent ID is blank), then from those tasks look for tasks that do have child tasks (number of childer > 0), once you've found those tasks just show what's in your "Stage - Task Level" field

 

IF(ISBLANK({parentID}),IF({numberOfChildren}>0,{DE:Stage - Task Level}," "))
 
If you don't have any stray tasks that aren't under a parent at the bottom of your task list, you could skip the part about looking for tasks that do have children.
 
valueexpression=IF(ISBLANK({parentID}),{DE:Stage - Task Level}," ")

1 reply

Madalyn_Destafney
Community Advisor
Community Advisor
August 7, 2023

Trying to understand your goal. You want to see incomplete parent tasks? If so, you can add a filter to your task report for ‘task > number of children’ greater than 0, to only pull parent tasks, and filter for percent complete greater then 0% complete. 

If this helped you, please mark correct to help others : )
DaBellAuthor
Level 3
August 8, 2023

Thanks for the reply.

This is a Project-based report.

 

There are multiple Parent Tasks nested in my Projects.  So, I can't look at the number of children.  I only want to display the top Parent, this is why I want to only get the Parent Task that does NOT have a parentID.

 

...and then display this custom field:


{DE:Stage - Task Level}

 

That is why I would like to wrap an IF statement that checks IF parentID = spaces/isnull?

I'm just not sure on that syntax.

Heather_Kulbacki
Community Advisor
Heather_KulbackiCommunity AdvisorAccepted solution
Community Advisor
August 8, 2023

@dabell 

I'd probably do a nested IF statement that first looks for tasks that don't have a parent (parent ID is blank), then from those tasks look for tasks that do have child tasks (number of childer > 0), once you've found those tasks just show what's in your "Stage - Task Level" field

 

IF(ISBLANK({parentID}),IF({numberOfChildren}>0,{DE:Stage - Task Level}," "))
 
If you don't have any stray tasks that aren't under a parent at the bottom of your task list, you could skip the part about looking for tasks that do have children.
 
valueexpression=IF(ISBLANK({parentID}),{DE:Stage - Task Level}," ")