Using Query on Reference Field using ServiceNow Connector in CoPilot Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 03:37 AM
Hi All,
I am currently working with the Microsoft Copilot ServiceNow connector to retrieve data from ServiceNow. Specifically, I am using the “List records” method to fetch data from the Business Application table (cmdb_ci_business_app). However, I am encountering a challenge when querying on reference fields, i.e., fields that store sys_id values from other tables.
For example, I need to find business applications where the application category is “Manufacture” or where the department is “SE DC.” These values are stored as sys_id references in the Business Application table, pointing to entries in the Application Category or Department tables.
Below is a screenshot illustrating my query to find applications where the application category is “Manufacture.” I have tried the following queries:
- application_category=manufacture
- application_categoryLIKEmanufacture
Both of these queries return null values.
However, when I pass the 32-character sys_id instead of the value “Manufacture,” such as application_category=c6XXXXXX1b245d104XXXXXX5bbXXXbae, I get the expected results.
So far, we have attempted a workaround where we first query the referenced table to get the sys_id for the desired value and then use that sys_id in the Business Application table query. While this approach works, it is not feasible when we need to filter based on multiple parameters simultaneously.
Can anyone provide guidance or a solution for querying reference fields directly by their display values rather than sys_ids? Any help would be greatly appreciated.
Thanks in advance!