How to restrict data of a table reference field in a custom table

ursnani
Giga Guru

I Have a field on my custom table which is 

Field Name : Table

Fied type = Table Name

When I created this field Its showing all the tables in Servicenow. But now I want to show only Some set of Table which are my Other Set of Custom Tables.

 

Can anyoNe please let me know on how to Achieve this

Please find the attachment of my field Dictonary

 

 

1 ACCEPTED SOLUTION

Reference field mayn't work since you have a condition field dependent on it.

 

Instead you may try a choice field and manually add the choices to the table field for your custom table.

 

If you have a Parent table, under which all you custom table are listed, may be you can add base_table attribute to it, which will only show you child table of the parent table.

 


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

View solution in original post

15 REPLIES 15

Reference field mayn't work since you have a condition field dependent on it.

 

Instead you may try a choice field and manually add the choices to the table field for your custom table.

 

If you have a Parent table, under which all you custom table are listed, may be you can add base_table attribute to it, which will only show you child table of the parent table.

 


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

Hi Sanjiv,

 

Yeah I did the same and It worked.

THanks

Priyanka More1
Tera Contributor

Hi Ursnani,

one solution is we can make table field as reference referring to sys_dictionay and add reference condition as the type is a collection and name start with 'u_' and it gives the required output 

 

 

Pranay Tiwari
Kilo Guru

Hi Ursnani,

 

you need to write a BR on your table and glide sys_metadata then fire query according to your requirement.

 

Mark correct or helpful if it helps you.

 

Warm Regards,

Pranay Tiwari

| www.DxSherpa.com | pranay.tiwari@dxsherpa.com |

Hi 

 

Can you please provide me the Code on how to achieve this that would be a great help

 

Thanks