Servicenow how to pass filter table names or regex to query sys_db_object and sys_db_view

skansal
Tera Contributor

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

4 REPLIES 4

Amit Verma
Kilo Patron
Kilo Patron

Hi @skansal 

 

Try as below in the REST API explorer :

 

AmitVerma_0-1707137409605.png

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

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

Hi @skansal 

 

Have you tried MATCH_RGX ? Refer https://www.servicenow.com/community/developer-blog/glidefilter-and-regular-expression-match/ba-p/22...

https://www.servicenow.com/community/developer-forum/scripting-question-regex-expression-in-glide-fi...

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

We did try this also, but not working.

 

Thanks,

shubham