Function Field 'Age' on Task table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2021 04:46 AM
I want to take advantage of the new function fields in Quebec to create an 'Age' field on the Task table which would provide reporting with the number of days old an active record is. The problem I am having is that I am unable to work out the correct syntax to use for the current date in the datediff function. So far, everything I have tried gives me the message 'not a supported function'. I have tried the following:
now()
nowDateTime()
update()
GlideDate()
new GlideDateTime()
new Date().getTime()
Date()
gs.nowDateTime()
Does anyone know what the correct syntax is?
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2021 11:49 AM
When I use this as the function definition on the task table, it works fine for me. Make sure your field type is Duration.
glidefunction:datediff(now(),opened_at);
Is this what you're using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 12:42 PM
Hi Dennis - This works for me, but the age doesn't stop running when the ticket state is closed..
Is there a way to add an IF statement into that glide function? Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 04:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2021 02:41 PM
I'm sorry, I thought you were talking about in the dictionary.
I don't think this is possible with the function fields feature of reporting. That feature is currently extremely limited. You could try putting it in as a feature request, it seems pretty obvious as something that needs to be added to me.
Sorry, wish I could be more help.