Servicenow how to pass filter table names or regex to query sys_db_object and sys_db_view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 03:03 AM
Hi Team,
In Servicenow, while quering sys_db_object and sys_db_views to get the list of tables, do we have an option to pass table names or regex that matches some table names and return only matching ones in response.
If yes, please share the REST API call for the same.
Thanks in advance,
Shubham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2024 04:50 AM
Hi @skansal
Try as below in the REST API explorer :
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 02:08 AM
Hi @Amit Verma
We have already tried this out, but still receiving all the records in response, not the filtered ones.
Is there any other way of filtering this?
Thanks,
Shubham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 02:24 AM
Hi @skansal
Have you tried MATCH_RGX ? Refer https://www.servicenow.com/community/developer-blog/glidefilter-and-regular-expression-match/ba-p/22...
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 01:59 AM
We did try this also, but not working.
Thanks,
shubham