Trigger sla based on the variable date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi 👋,
I have a catalog item variable called "Return Date" with the variable type set to Date.
I need to trigger an SLA based on the value selected in the "Return Date" variable of the catalog item.
The SLA should attach to the sc_task table.
I have already configured the SLA as shown in the screenshot below, and it works correctly only when the Return Date is the current date. For example, if the Return Date is 21-05-2026 (today), the SLA gets attached and works as expected.
However, if the Return Date is a future date, such as 22-05-2026, I expect the SLA to get attached on that specific date. But currently, the SLA is not getting triggered or attached for future dates.
PROBLEM STATEMENT:
On 20th May 2026, I created two requests:
1. First request had the Return Date set as 20-05-2026
2. Second request had the Return Date set as 21-05-2026
The SLA is configured on the sc_task table and is supposed to attach based on the value selected in the Return Date catalog variable.
For the first request, where the Return Date was 20-05-2026 (same day), the SLA got attached and worked correctly.
However, for the second request, where the Return Date was 21-05-2026 (future date at the time of request creation), the SLA did not get attached.
Now today, on 21-05-2026, when I checked the second request, the SLA is still not attached even though today matches the Return Date mentioned in the catalog variable.
Expected behavior:
The SLA should automatically attach to the sc_task record on the exact date mentioned in the Return Date variable, even if the request was created earlier.
Please let me know how we can achieve this condition
Thanks in advance for your help🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Update duration (for you its 5 days) -> when SC_task would be created , it check on that duration, if any sla delimitation is there. If SLA start condition matches, that sla will be attached.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
so you want SLA to start when the Return date reaches?
Consider SC Task created on today and Return date is 25th May.
If yes then did you try giving this in Start Condition. See if that works
variables -> Agreed Date [ON] Today
OR
If the above doesn't work then try this
1. Create a custom Date field on the sc_task table.
2. Create a before insert business rule that sets the Date field to date with the Agreed date.
BR will run only when it's for your catalog item
current.request_item.cat_item.name == 'Your Item Name'
Script:
var ritm = current.request_item.getRefRecord();
current.u_my_field = new GlideDateTime(ritm.variables.u_agreed_date).getDate;
3. In your SLA start condition add this My Field [ON] Today
💡 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 || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader