Coding help for custom column in report | Community
Skip to main content
April 2, 2024
Solved

Coding help for custom column in report

  • April 2, 2024
  • 3 replies
  • 1265 views

I'm new to creating custom columns in reports and I'm having trouble with the below.

 

I want to create a column that shows if a task is completed by looking for the task name and the percent complete is under 100%.

 

Here is the code that I came up with but it's not populating the column.

displayname= Instructor Materials Upload

listdelimiter=<br>

listmethod=nested(tasks).lists

textmode=true

type=iterate

valueexpression= IF({name}="Upload instructor materials"&&{percentComplete}<100,"Not Done","")

valueformat=HTML

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 JoaquinAv

Hi Karen, 

 

Here's the good news, the basic structure of your text mode works. I'm not sure what is happening in your instance of WF, but I suspect it's something fairly easy to problem solve. Here a couple steps you can take to make sure everything on your side is set up for what you need. 

 

1) Since this is a collection text mode, double check you're in the right report. i,e, Project Report. This will not work in a Task Report since you're already in that object. 

2) Double check spelling and capitalization is accurate for the Task you are trying to target. WF can be finicky at times and it's good habit building to be as accurate as you can. 

3) Test on something you know should work. i.e. a Test Project with Test Tasks. See if you can get it to work there first and then adjust what you need to make it work globally. 

 

Hopefully, this helps. 

 

Best,

Joaquin

3 replies

Madalyn_Destafney
Community Advisor
Community Advisor
April 2, 2024

You could just use column formatting for this... go to your column and can add rules to highlight the cells or whole rows that match a task name and is less than 100%. You can still have the column read as 'Not Done' in place of the % completion if you'd like. Maybe have the rule on the % complete column and just filter the report itself to only those tasks with the certain name you're looking for?

 



If this helped you, please mark correct to help others : )
JoaquinAv
JoaquinAvAccepted solution
April 2, 2024

Hi Karen, 

 

Here's the good news, the basic structure of your text mode works. I'm not sure what is happening in your instance of WF, but I suspect it's something fairly easy to problem solve. Here a couple steps you can take to make sure everything on your side is set up for what you need. 

 

1) Since this is a collection text mode, double check you're in the right report. i,e, Project Report. This will not work in a Task Report since you're already in that object. 

2) Double check spelling and capitalization is accurate for the Task you are trying to target. WF can be finicky at times and it's good habit building to be as accurate as you can. 

3) Test on something you know should work. i.e. a Test Project with Test Tasks. See if you can get it to work there first and then adjust what you need to make it work globally. 

 

Hopefully, this helps. 

 

Best,

Joaquin

KarenNe2Author
April 2, 2024

Thanks for the help!  I was trying to do this in a task report.  Now I'll try it in a project report.

skyehansen
Community Advisor
Community Advisor
April 2, 2024

I can't say for sure but I'm wondering if it's because your task name is not exactly as you put it above, including case. So if your task name was "Upload Instructor Materials" and you search on "Upload instructor materials", it will not match with your actual task name. I always advocate for people to try troubleshooting their valueexpression by building a simple expression and adding on. In your case, you could have tried something super simple like a valueexpression=IF({name}="___","Yes","No") and built your way up from here. The premise being that if you're stuck at the very beginning, then at least you know what to fix.

 

Users who run across case sensitivity issues will often go back to the link below and investigate throwing an UPPER or LOWER into the mix. Again... try to make sure you have the name searching working correctly before moving onto the percent complete and the rest of the calculation.

 

https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/calculated-custom-data/calculated-data-expressions