Remote Tables Definition: Is there a possibility to pass value dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 05:56 AM
I want to pass dynamic filter value for REST message used in Remote Definition. Is this achievable? if yes, let me know the possible ways to pass the filter value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 12:24 AM
Thank you all for your reply, let me reframe my question.
I want to pass dynamic value to remote definition, so that I can use the remote table in reference field on catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 12:43 AM
Thank you all for your responses, let me reframe my question.
I want to use the Remote table in catalog item reference variable, to use the response returned from API call. I am getting the response from API call by static values as of now. but wanted to pass values dynamically.
scenario: When a user enters string value 'UserID' on the form, then I want to pass 'UserID' value to Remote definition as dynamic filter. Is this possible or not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2025 02:16 AM
@pm5481 - Have you resolved this? as i am also facing same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
There are a couple of months now, but I'll post it here just for anyone else looking at a solution on this.
You can actually use query condition "creatively" to pass parameters to the definition script or flow - just take any parameter name that is not a field on your table and pass it on your query.
Let's take an example where I just use gliderecord to populate a remote table I build with incidents. I'm parsing a "test_parameter" field on the applied query using v_query - there is no actual dictionary definition for that on the remote table, I only use that to inject a parameter into my definition script:
(function executeQuery(v_table, v_query) {
var test_parameter = v_query.getParameter("test_parameter");
var grinc = new GlideRecord("incident");
if (test_parameter=='1'){
grinc.addActiveQuery();
}
else if (test_parameter=='2'){
grinc.addQuery("state", 7);
}
grinc.query();
while (grinc.next()){
v_table.addRow({"sys_id": grinc.getValue("sys_id"),
"u_number": grinc.getValue("number"),
"u_short_description": grinc.getValue("short_description"),
"u_priority": grinc.getValue("priority")
});
}
})(v_table, v_query);
This is how you'd pass the parameter then from a list view:
This is how you'd pass the parameter from a reference field/variable:
The same goes for related lists/relationship or fixed queries.
Always apply an "test_parameter=<VALUE>^ORtest_parameterISEMPTY" after you pass these "fake" parameters so that the actual query that is applied at any time is not affected.
