Adding dynamic duration column on report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have one report in which user information is there. I want to add one column for the duration(in years and months) the user has been with the company and that should be dynamic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
if you are using standing reporting then you can use a function field which stores the difference between now time and sys_created_on
see this link
Function Fields in ServiceNow Reports: Calculate and Display Data on the Fly
see this gif which helps you
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
there is one field in the user table called hire date. i want to get the duration of the hire date till today dynamically. how can i do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Servicenow reporting is great at displaying data - but it's purpose is not to calculate it...it's not excel.
If it were me, here are the things I'd try:
- Chunking instead of calculating - throw it on a bar graph with a bar for hire date less than 1 year ago, hire date 1-5 years ago, 5-10 years ago, and 10+ years ago - or whatever makes sense for your team.
- Collaborate with your platoform team to calculate the data - perhaps as a calculated column on the user table or something that makes sense for your team.
- Create a function field as Ankur suggested above - but those are a drag on performance for any query on the table so i would not suggest it unless you have a very small table that is not queried often
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
the link and approach I shared will work for you.
I informed to use Created on date, you can use your Hire date instead of that
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
