Relative Duration

Dipali Pawar2
Tera Contributor

Hello, I am working on Record producer and I have to create SLA for that, In the SLA condition the SLA duration should be Four working days prior to value date specified by requestor in form(value date is the field in the record Producer).

Lets say if we select value  date as 31st July in the form then SLA should start on 27th July. 

Please provide solution it's quite urgent 

1 ACCEPTED SOLUTION

dmathur09
Kilo Sage
Kilo Sage

Hi Dipali,

You would need to create one more field say xyz which would be populated based on the value date. So if the user selects 31st July on value date, the xyz field would be populated with 27th July. Once that is done, in the SLA part you can use set start to field as the xyz fieldfind_real_file.png You can make the xyz field hidden, so that users are unable to see that field.

Let me know in case you have any further queries

If you think my response is helpful for you? If yes, mark it as correct answer and close the loop so that it would help future readers as well.

Regards,
Deepankar Mathur

View solution in original post

7 REPLIES 7

Aman Kumar S
Kilo Patron

You can follow below script to fetch the date:

var gdt = new GlideDateTime();
gdt.addDays(-4)
gs.info(gdt.getDisplayValue());

 

Feel free to mark correct, If I answered your query.

Will be helpful for future visitors looking for similar questions 🙂

Best Regards
Aman Kumar

Thanks for your reply,but how it will fetch the value date which is present in form?

Harish KM
Kilo Patron
Kilo Patron

Hi here is the answer for you

https://community.servicenow.com/community?id=community_question&sys_id=5c52df61db8ee700b1b102d5ca961962

Regards
Harish

Thanks for the quick reply, but in our requirement we can not tick Retroactive start. is there any alternative solution?