Table dropdown doesn't show Global tables from a scoped application.

Raheem Pp
Tera Contributor

I have created a table Table1 which is in global scope extends application files(Same like Business Rule table). And I have created a field Field1 of type Table Name for the same table. Now when I try to create a record in the table Table1 from my private scope, the table dropdown  for the Field1 doesn't show the global tables from the private scope. It only shows tables from the same scope. But when I go to business rule, I am able to pick all the global tables from the same scope. Can anyone know how does it act different? I replicated almost everything from BR table like application access and other configs etc. 

5 REPLIES 5

Tony Chatfield1
Kilo Patron

Hi, unfortunately your post does not make your issue or configuration clear. Perhaps you could update the thread with more specific details of your configuration so that the community can better understand your issue.

IE Data types, Exact steps to reproduce, and details of the views\form you are in etc.
Perhaps you could also clarify your intended use, as I can't think of a scenario where it would be necessary to replicate the Business Rules table.

I am not actually trying to replicate BR, I was trying to create a Dynamic Filter Options from my scope and trying to select sys_user_group table as the reference value (screenshot attached), but the reference dropdown only shows tables from my scope. Here, Dynamic Filter Options and sys_user_group tables are in global scope. So to understand more, I just created the Table1 and Field1 in global scope and checked how it works. it works same as Dynamic Filter Options. But when I check BR, it has a table column, it shows all the tables in the dropdown, not just the tables from my scope.

Filip Vojt__ek
Mega Guru

Please use dictionary attribute 'allow_public=true' on the table type field/column to allow tables from all scopes as described in documentation.

https://docs.servicenow.com/en-US/bundle/vancouver-platform-administration/page/administer/reference...

Please mark my solution as helpful if it helped to solve your issue.

Chris Terzian1
Tera Contributor

Thanks Filip.  I wasted about an hour on this today because I've done the exact same thing without need to set this attribute, albeit with an older version of ServiceNow.  The use case for me is a "rules table" or "mapping table" which I've created many times.  Using the "table name" field is idea, but limited in that it doesn't allow modifying from a list view, while using a "reference" field on the "sys_db_object" table, with a reference qualifier to show only tables we want to display (i.e. app base tables, extended tables, and select global tables -> all defined in a custom property for extensibility).  In the past, just setting the query to pull the list of tables based on our property was enough.  This time, global ones were not appearing!  After beating my head against a wall for an hour, I found the allow_public property and tried it.  WORKED!  Then I thought... I wonder if someone on community already found this??  Well.... found your post 🙈.  

So for any others trying to solve the same problem, hopefully this "allow_public=true" for the field type attribute does the trick when dealing with scoped apps and showing global elements, and hopefully it DOESN'T change again in a future version 😛 

 

Example table below.  Used as rules tables, mapping tables, lookup tables, etc in Scoped Apps.  Allows list view or form view editing of the source / target tables and fields by leveraging reference fields on the sys_db_object and sys_dictionary tables.  We can use the "ref_auto_completer=AJAXReferenceChoice" on the fields table attributes to allow dynamic field list updates in the UI whether using List or Form views (unless that changed in the last year also!)

 

Note:  in the screenshot below, we have custom tables and global tables showing in the same list. 

Screenshot 2025-01-08 at 4.05.47 PM.png