The CreatorCon Call for Content is officially open! Get started here.

How to access the RITM table fields from the flow designer

Akshay Nayak
Tera Contributor

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);

 find_real_file.png

How can i access the fields on the RITM table using fd_data.trigger, or is it impossible to do so.

 

Thanks in advance

6 REPLIES 6

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Swapnil Soni1
Giga Guru

Hi,

Once you activate the Flow Designer / Service Catalog Plugin you will have a new trigger option for Service Catalog:

find_real_file.png

 

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:

find_real_file.png

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:

find_real_file.png

 

After which the variables will be available in the "Data" section of the flow:

find_real_file.png

 

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