Calculate the date difference using flow design
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 10:25 PM
Hi All,
Based on some trigger conditions, we need to submit a catalog item request. This is done using he subflow and business rules and it's working as expected.
So now, on the form that we're using for trigger conditions, there's a field 'start_date' and 'end_date'. Based on that dates, when the catalog item request is auto-submitted, we need to calculate the difference in the days (end_date - start_date) not directly from he value in the table. Instead, we need to store the values in the variables in the RITM, then calculate the difference and then store that difference value in the field in the form. How can I achieve this using the same flow design and then update the record.
@Ankur Bawiskar @Rahul Talreja @Pavankumar_1 @Manmohan K @Vishal Birajdar @Dr Atul G- LNG @AnveshKumar M @SwarnadeepNandy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 10:34 PM
so based on form fields you need to set variables
you can calculate the difference and set the variable as well with the difference.
Did you try to use inline script while setting the variable?
share current flow screenshots.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 10:54 PM
Thank you for your response.
From action 5, it's the TASKS. No, I did not use the inline scripts. I tried with other method outside of flow-design. But that did not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 11:33 PM
So what are you doing in action 5?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 11:35 PM
Creating different TASKS for other automation.