Hi Team, i have created flow action under script step and values are coming undefined can you please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 01:05 AM
Hi Team, i have created flow action under script step and values are coming undefined can you please check on this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 01:09 AM
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
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 01:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 01:19 AM
@AA6 try to use ritm.requested_for.getDisplayValue(); or keep only ritm.requested_for;
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 01:19 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:21 AM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader