Expand my Community achievements bar.

using DateDIff in a report column

Avatar

Level 2
I would like to do a simple value in a report showing the days since a certain tasks completion date as compared to the current date. I have not attempted text mode before so I'm sure this is totally off, but here is what I have tried with no results. I haven't been able to find Text Mode resources. displayname=# Days Pending textmode=true valueexpression=datediff({$$today},{actualcompletiondate}) valueformat=HTML Tim Watts Disney Institute
Topics

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

3 Replies

Avatar

Community Advisor
Hi Tim, Untested, but I'd suggest trying this: displayname=# Days Pending textmode=true valueexpression=datediff( $$TODAY,Actual Completion Date ) valueformat=HTML Regards, Doug Doug Den Hoed - AtAppStore SEE you at LEAP using the GPS App! https://tinyurl.com/LEAPGPS Got Skills? Lend a hand! https://community.workfront.com/participate/unanswered-threads

Avatar

Level 4
Don't forget that all functions such as DATEDIFF have to be in capital letters. Capitalization is key in Text Mode $$TODAY, $$USER, $$NOW are always capitalized $$TODAYbw-1 - modifiers are lower case -- Melinda Layten, Senior Consultant Work Management Improvement CapabilitySource Phone: (484) 505-6855 site: www.capabilitysource.com email: melinda.layten@capabilitysource.com Helpful? Buy me a coffee: https://www.patreon.com/mlayten - we simplify your work so you can run your business -

Avatar

Level 3
Hi Tim, Adding to what Doug and Melinda have said, it's also worth mentioning there are subtle differences between syntax on custom fields (the ones you set up on a custom form) vs calculated fields in reports. If I'm interpreting correctly, I think you are working on a calculated field in a report? If so, I believe the below is what you are trying to achieve (I changed "actual" to "planned" on the completion date, based on your column name, but you can switch it to "actualCompletionDate" if I misunderstood. I also threw in something to round it to one decimal point). displayname=# Days Pending textmode=true valueexpression=ROUND(DATEDIFF({plannedCompletionDate},$$TODAY),1) valueformat=HTML To get you started with text mode reporting, Workfront's Advanced Reporting classes are a great resource. You can also find a number of examples by searching the forum, or by reviewing the "Understanding Text Mode" topics on the help site (https://support.workfront.com/hc/en-us/categories/202563507-Reports). Once you really get underway with text mode reporting, you'll find the API Explorer is a must (https://support.workfront.com/hc/en-us/articles/220633507-API-Explorer). This shows you the various fields for the different types of reporting objects (project, task, etc.), as well as the way Workfront needs to see them on the "valueexpression" line in text mode. Capitalization must be exactly the way it wants to see it on the field names, or it won't work. Good luck, and feel free to ask questions. We've all started where you are now. Kathy