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

replace line 4 with 

 

return 'custom_table1,custom_table2,custom_table3'


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

Its not coming as a dropdown rather its coming in this way

find_real_file.png

This may not work. May be you should create a Reference field to table 'sys_db_object' and add you filter using Simple Reference Qualifier


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

Yeah if we make Field type as reference and Referred the Sys_ob_object Table then it works perfectly as I want 

but as per the Business req. The field type must be Table Name as we have Conditon Builder based on that Field.

 

Hi sanjiv,

 

I have changed the Field type to Reference but now my Condition builder is not working as I have givent h Sys_id od the table to be displayed, In my COndition Builder I am not getting the Field of those tables.

 

Can you please help me with this.

 

find_real_file.png

 

THanks