- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi everyone,
I’m working in Flow Designer and I’m getting an error when testing my Flow/Action, specifically in a Look Up Records step where I use a Condition Script (encoded query).
I’m trying to push records from an “Equipements” table to an external system using a Gateway HTTP POST (pipeline/subject).
So the flow does:
Look up equipment records updated recently
Build the payload
POST to the Gateway endpoint (subject-based URL)
What I’m trying to do
Filter equipment records in the last X hours, where X comes from an Action input called hours (Integer).
My setup
Flow: Scheduled trigger (Daily)
Action: “Push Equipements C&R”
Action Input: hours (Integer)
Step: Look Up Records on table <my_equipment_table>
Conditions: Script returning an encoded query
Next step: REST (POST) to Gateway with Content-Type like application/vnd.phenix.gateway.binary+json
Script (Conditions)
Error I get
Unsupported reference: inputs (from fd_data.action.inputs)
(or sometimes: Unsupported reference: inputs (from fd_data.inputs.hours))When testing the flow: Could not retrieve snapshot for test using snapshotId ...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @manale460681490
Try the below approach. It's working as expected.
Action:
Script:
var hours = parseInt(fd_data.action_inputs.hours,10);
if (isNaN(hours) || hours <= 0){
hours =24;
}
return "sys_updated_onRELATIVEGT@hour@ago@"+hours;
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi @manale460681490
Try the below approach. It's working as expected.
Action:
Script:
var hours = parseInt(fd_data.action_inputs.hours,10);
if (isNaN(hours) || hours <= 0){
hours =24;
}
return "sys_updated_onRELATIVEGT@hour@ago@"+hours;
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
what your action is accepting as input?
share some screenshots
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
