Help with text mode to show plannedCompletionDate minus two days if task name contains "and Approval" | Community
Skip to main content
AndrewGr1
Level 3
June 28, 2024
Solved

Help with text mode to show plannedCompletionDate minus two days if task name contains "and Approval"

  • June 28, 2024
  • 1 reply
  • 923 views

I am wondering if anyone could help figure out if this is possible and can help with the text mode code to have a column in a task or assignment report show the plannedCompletionDate minus two days whenever the task name contains "and Approval" to provide a better due date for users to allow two days for task approvals to go through since we can't build in durations for task approval loops once a task is completed. 

Thank you!

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 WeberJ
@andrewgr1 To return this date, you could add a text mode column: 
displayname=Text Edit
textmode=true
valueexpression=IF(CONTAINS("Approval",{name})=true,ADDDAYS({plannedCompletionDate},-2),{plannedCompletionDate})
valueformat=HTML
 
Or you could pull out the expression and use it in a calculated field:

IF(CONTAINS("Approval",{name})=true,ADDDAYS({plannedCompletionDate},-2),{plannedCompletionDate})

1 reply

WeberJ
WeberJAccepted solution
June 28, 2024
@andrewgr1 To return this date, you could add a text mode column: 
displayname=Text Edit
textmode=true
valueexpression=IF(CONTAINS("Approval",{name})=true,ADDDAYS({plannedCompletionDate},-2),{plannedCompletionDate})
valueformat=HTML
 
Or you could pull out the expression and use it in a calculated field:

IF(CONTAINS("Approval",{name})=true,ADDDAYS({plannedCompletionDate},-2),{plannedCompletionDate})

AndrewGr1
AndrewGr1Author
Level 3
June 28, 2024

Thank you so much! That appears to be working well for task reports. I had trouble manipulating it to work in an assignment report instead, though.

 

Would you happen to know how to get that same code to work in an assignment report?

AndrewGr1
AndrewGr1Author
Level 3
June 28, 2024

@weberj  And I guess if it's possible, it would be even better to show that adjusted due date as a column based on if there is a task approval, if that logic is possible rather than relying on how we name the tasks, which isn't always consistent.