Restrict the fields shown in a form

abhinavmoha
Tera Contributor

So I have a form and it gets all the tables from i think sys_db_objects, I want to restrict it to only get certain tables, how do i do this. How do i edit the rules for this form.

abhinavmoha_0-1745491539376.png


how do i restrict this say to use only cmdb tables or use non sys tables?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@abhinavmoha 

something like this for only cmdb tables or non-system tables

To show only cmdb tables use this in advanced reference qualifier

javascript: 'sys_class_nameINSTANCEOFcmdb_ci';

AnkurBawiskar_2-1745502160122.png

 

 

Output

AnkurBawiskar_1-1745502128079.png

 

To block system tables you can check for name [Does not contain] sys

AnkurBawiskar_3-1745502286821.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @abhinavmoha 

You need to add a reference qualifier to restrict the table. This is just an example, so make sure to apply this condition only to the child table, not the parent table. Otherwise, it will result in a global change. Additionally, wherever the sys_db_object table has been used, it should show only those tables.

 

AGLearnNGrow_0-1745501228702.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@abhinavmoha 

something like this for only cmdb tables or non-system tables

To show only cmdb tables use this in advanced reference qualifier

javascript: 'sys_class_nameINSTANCEOFcmdb_ci';

AnkurBawiskar_2-1745502160122.png

 

 

Output

AnkurBawiskar_1-1745502128079.png

 

To block system tables you can check for name [Does not contain] sys

AnkurBawiskar_3-1745502286821.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@abhinavmoha 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ok this one worked, but I also want to include Database views along with it, is there anyway to do that?