- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 05:14 AM
In my Flow Designer flow, I'm trying to query the u_bia_response table based on the parent sys ID of a business application which has a certain relationship type with the current child business application. I'm trying to extract the parent business application sys ID as below:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 12:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 12:52 AM
So did the flow variable store the correct sysId as per change I suggested?
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 01:17 AM
Thanks @Ankur Bawiskar That worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 01:19 AM
Glad to know.
Would you mind marking my response as correct?
Seems you marked your own response as correct by mistake.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2025 01:39 AM
Would you mind marking my response as correct?
Seems you marked your own response as correct by mistake.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 06:47 AM
Will this work:
var parentSysId = '';
var childSysId = fd_data.trigger.current.sys_id; // if it doesn't work, log the sysid to see what you get.
var relTypId = gs.getProperty('lbg.busApp.parent_child_relationship'); // Ensure this returns a sys_id!! add logging to be sure
var grCmdbRelCi = new GlideRecord('cmdb_rel_ci');
grCmdbRelCi.addQuery('child', childSysId);
grCmdbRelCi.addQuery('type', relTypId);
grCmdbRelCi.addQuery('parent.sys_class_name', 'cmdb_ci_business_app');
grCmdbRelCi.query();
if (grCmdbRelCi.next()) {
parentSysId = grCmdbRelCi.getValue('parent'); // if it doesn't work, log the sys id to see what you get returned
}
return parentSysId;
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 07:32 AM
Hi @Mark Manders I tried that and it stills on the right hand side as data unavailable