Hi Team, i have created flow action under script step and values are coming undefined can you please

AA6
Tera Contributor

Hi Team, i have created flow action under script step and values are coming undefined can you please check on this ?

 

 

AA6_0-1752652894332.png

 

AA6_1-1752653065597.png

 

 

9 REPLIES 9

Shraddha Kadam
Mega Sage

Hello @AA6 ,

 

Use ritm.requested_for.getDisplayValue(); or ritm.requested_for.getValue();

 

Using getDisplayValue() - You will get Name

Using getValue()- You will get the sys_id of the record

If my response was helpful, please mark it as correct and helpful.
Thank you.

Hi @Shraddha Kadam  i used .getVlue();

still i am getting same error

AA6_0-1752653799167.png

 

@AA6 try to use ritm.requested_for.getDisplayValue(); or keep only ritm.requested_for;

If my response was helpful, please mark it as correct and helpful.
Thank you.

J Siva
Tera Sage

Hi @AA6 
There is no OOB field named value in the sys_user table.
If you're trying to retrieve the sys_id of the requested_for user, use requested_for.sys_id.
Also, since you've mentioned that this is a custom action, you must pass the Requested Item as one of the inputs to your custom action.
Otherwise, you won't be able to use it within the action.
Regards,
Siva

Ankur Bawiskar
Tera Patron
Tera Patron

@AA6 

what's the type for the Input test ?

if it's GlideRecord object of sys_user then requested_for is not a field on OOTB sys_user table

please explain in detail what's the business requirement

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