Script to get the reference data in flow designer

maryc
Tera Contributor

Hello,

 

I have a REST API returning a Array Object containing CI . I am looping thru the data and inserting into the respective CI  table. How do I script to insert the Manufacturer or model ( which is a reference ).

 

Attached is the screenshot of what am doing and am struck with the script part

 

Thanks in advance

2 REPLIES 2

Swapna Abburi
Mega Sage
Mega Sage

Hi @maryc 

You can use scripting in the field mapping by toggling the script section. Sample script in the below screenshot and update field, table and query according to your requirement.

 

SwapnaAbburi_0-1740538293551.png

 

Ankur Bawiskar
Tera Patron
Tera Patron

@maryc 

are you getting the manufacturer as well in API response?

if yes then you can map it directly

If not then use f(x) inline scripting and based on the CI record get the manufacturer

please share some more details

If my response helped please mark it correct and close the thread so that it benefits future readers.

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