- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi,
I facing an issue in flow , there is a loop up record action to fetch the value of field, .
some other condition new record will be create. In that one field needs to update by the above mentioned field.
eg:
first record have Date occur .
when second record get created the Date occurred will be 30 days more than the first record occur date,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Arun_Manoj
I'm assuming Date occur is Date/time field and has backend name as date_occur
When your action creates a second record, in field select the field Date occur. For this field toggle the scripting on and you can follow similar script and tweak as per your use case. it would be great if you shared more details/screenshot.
var date1 = fd_data._1__look_up_record.record.date_occur;
var gd = new GlideDateTime(date1);
gd.addDays(30);
date_occur=gd;
return date_occur;
Thanks and Regards,
Mohammed Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Arun_Manoj
I'm assuming Date occur is Date/time field and has backend name as date_occur
When your action creates a second record, in field select the field Date occur. For this field toggle the scripting on and you can follow similar script and tweak as per your use case. it would be great if you shared more details/screenshot.
var date1 = fd_data._1__look_up_record.record.date_occur;
var gd = new GlideDateTime(date1);
gd.addDays(30);
date_occur=gd;
return date_occur;
Thanks and Regards,
Mohammed Zakir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
share some screenshots so that we can help better
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader