Project Report | IF statement not working properly for custom column | Community
Skip to main content
Level 3
January 4, 2024
Solved

Project Report | IF statement not working properly for custom column

  • January 4, 2024
  • 1 reply
  • 884 views

Hello. I am building a project report to count how many projects are created as new vs update to capture the trend over time. To determine what is new vs an update, I decided to create a custom column with an IF statement to compare the project Entry Date and Last Update Date. 

 

Text Mode:

displayname=New or Update
textmode=true
usewidth=true
valueexpression=IF({lastUpdateDate}!={entryDate},"Update","New")
valueformat=html

 

The column displays values but its not working properly. As you can see from the screenshot, its categorizing everything as Update when the two highlighted lines should be "New". I have tried adjusting the =, >, <  as well as using CLEARTIME and WEEKDAYDIFF, but it seems to ignore the IF statement and mark everything as "New" or "Update". 

 

Does anyone have any suggestion on what may be the issue? Or is there a better way to build the report that I need? 

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 NicholeVargas

@anniexle The CLEARTIME function should work, you just have to add it to both sides of the expression. I tried it in my instance and it works as expected. 

displayname=New or Update textmode=true usewidth=true valueexpression=IF(CLEARTIME({lastUpdateDate})!=CLEARTIME({entryDate}),"Update","New") valueformat=HTML

 

1 reply

NicholeVargas
Adobe Employee
NicholeVargasAdobe EmployeeAccepted solution
Adobe Employee
January 4, 2024

@anniexle The CLEARTIME function should work, you just have to add it to both sides of the expression. I tried it in my instance and it works as expected. 

displayname=New or Update textmode=true usewidth=true valueexpression=IF(CLEARTIME({lastUpdateDate})!=CLEARTIME({entryDate}),"Update","New") valueformat=HTML

 

AnnieXLeAuthor
Level 3
January 5, 2024

@nicholevargas thank you so much! I was using CLEARTIME to bracket both {lastUpdateDate} and {entryDate}. Anyways, placing the CLEARTIME in both sides of the expression did help to tag each entry correctly.

Doug_Den_Hoed__AtAppStore
Community Advisor
Community Advisor
November 8, 2024

 

Glad this worked for you @anniexle,

 

Thanks for pinging me about this one @katherinela; this is indeed a good example of the CLEARTIME functionality, noting (hair-splittingly) that a project updated throughout the day it was first entered will then still be considered "New" until its lastUpdateDate is triggered on a subsequent day, when it will then and thereafter be considered "Update".

 

Which might be Just Right.

 

Regards,

Doug