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-19-2020 02:31 AM
Hi Akshay,
please share screenshot where you are trying and also the steps you added
try if this works
var open = fd_data.trigger.opened_at.getDisplayValue();
var close= fd_data.trigger.u_fulfilled.getDisplayValue();
return gs.calDateDiff(open,close,false);
Regards
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:04 AM
Hi,
Once you activate the Flow Designer / Service Catalog Plugin you will have a new trigger option for Service Catalog:
After you create and save the flow with "Service Catalog" trigger you can then head to your Catalog Item and add the "Flow" field to the form. Make sure there are no values in the "Workflow" or "Execution Plan" fields then select your newly created flow in the "Flow" field:
Once you are back in your Flow you can add the action "Get Catalog Variables" and configure it to select your catalog item. Once your catalog item is selected in the "Template Catalog Item" you can then select the catalog variables to utilize in the flow like so:
After which the variables will be available in the "Data" section of the flow:
When the catalog item is submitted by an end user the variables will automatically be associated to the RITM and will show in the variable editor.
Hope this helps.
Please mark correct or helpful.
Thanks