Condition for 60 day date validation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 3 hours ago
Hi,
I have to create a condition to meet the below requirement:
Date of today is greater than Date of field 'Sent for Approval' + 60 days. The Date of field 'Sent for Approval' is a variable and I was able to add its value in the Dashboard using database view. I want to check which condition will be better:
javascript:gs.daysAgoStart(60)or '60@days@ago'?
The value field is the date of the field 'Sent for Approval'
or
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I am trying on change record:
try similar for value.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
Hi @Dr Atul G- LNG
The Planned End Date is a date-type field, so you can use it. However, in my use case, the 'Value' field is a string type, which is why I can’t use before like in your Change Request example.
That’s why I need a condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @miro2
That’s a challenge. You need to store this in a proper date format first; then you can compare it. Otherwise, there’s no easy or direct way to do it. A date can be compared to another date, but a date versus a string cannot.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
share how and from where that filter is going to be applied.
Please share complete screenshots
💡 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
2 hours ago - last edited 2 hours ago
This will be used in a dashboard in Single Score visualization. The data source is my Database view combined from 3 different tables (HR Payroll, Custom, and Question Answer tables).
The 'Value' field comes from the Question Answer table (Value in my particular use case will store date in String field). Since I wasn't able to fetch the variable value directly, I had to fetch it from the Question Answer table.
