Error: attempting to use undefined input = 'current' from "Catalog Item".

pardhiv
Tera Contributor

I have a flow designer that has a trigger "Service Catalog". I get the following error when I try to activate the flow.

Error:- Attempting to use undefined input = 'current' from "Catalog Item".
I confirmed that the following variable is present on the catalog.
 
var reqForLocation = fd_data.trigger.current.variables.requested_for.location.u_id;
 
Tried removing  variables there is similar field requested_for on RITM.
 
1 ACCEPTED SOLUTION

use this

var reqForLocation = fd_data.trigger.request_item.variables.requested_for.location.u_id;

Regards
Ankur

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

View solution in original post

8 REPLIES 8

Martin Ivanov
Giga Sage
Giga Sage

Have you tried to remove the current:

var reqForLocation = fd_data.trigger.variables.requested_for.location.u_id;


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

yes then error with requested_for

Tried

var reqForLocation = fd_data.trigger.variables.requested_for.location.u_id;
 

Now it shows:-    attempting to use undefined input = 'variables' from Investigate Hold

ersureshbe
Giga Sage
Giga Sage
Hi, Are you using the code is particular activity if yes , you should use var reqForLocation = current.variables.requested_for.location.u_id If it provides an error try to use below and see the result and finally add dot walk in. var reqForLocation = current.variables.requested_for. Regards, Suresh.
Regards,
Suresh.