How to access the RITM table fields from the flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2020 03:11 AM
I am trying update the Duration field on RITM from the flow designer. The duration field value will be the calendar date difference between the opened and fulfilled / resolved dates. To achieve this i am trying to use the flow designer. Is it possible to do that via flow designer, as i am unable to drag and drop the data pills on the duration field. when i am trying to use the below script, the error will be show when i try to activate the flow.
var open = fd_data.trigger.current.opened_at.getDisplayValue();
var close= fd_data.trigger.current.u_fulfilled.getDisplayValue();
return gs.calDateDiff(open,close,false);
How can i access the fields on the RITM table using fd_data.trigger, or is it impossible to do so.
Thanks in advance
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2020 11:00 PM
Chk this
Mark my ANSWER as CORRECT and hELPFUL if this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2020 11:11 PM
Hi,
check this link
If my answer helped you in any way, mark answer as helpful and correct.
Thanks and regards,
Megha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2020 11:27 PM
Hi,
you need to use this action in flow designer and then you can access the variables
1) Get Catalog Variables Action
you can then access those as below
Push the variables you want to right side -> I have selected date, test and group
Script:
var val = fd_data._1__get_catalog_variables.date;
gs.info('Variable value is: ' + val);
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2020 01:01 AM
Hi Ankur,
Thanks for your reply, The solution you suggested is to access the Variables, but i am trying to access the fields on the RITM table like opened or closed fields. is there any way to access it with out creating a custom action?
Thank you