Can we use reference lookup in custom ui pages in servicenow

Harsha6
Giga Contributor

Hi Community, 

My use case requires me to build a custom UI page with a field that can act like a reference field in for all the table names in servicenow. Is this possible?, if it is kindly point me in the right direction. Any help is much appreciated.

Thanks!

1 ACCEPTED SOLUTION

Hi Jim, 

 

Thank you very much for taking time to respond, this solution worked but this is not a look up for the name of tables rather it is a look up for users.

<g2:ui_reference id="user_picker"
name="table_picker"
table="sys_db_object"
columns_search="false"
order_by="name"
show_popup="false" />

 I made the following changes to get the list of tables.

 

Thanks for the solution.

 

 

View solution in original post

4 REPLIES 4

Jim Coyne
Kilo Patron

The "g2:ui_reference" tag should help you out:

<g2:ui_reference id="user_picker" 
                 name="user_picker"
                 table="sys_user"
                 columns_search="false"
                 order_by="name"
                 show_popup="false" />

Hi Jim, 

 

Thank you very much for taking time to respond, this solution worked but this is not a look up for the name of tables rather it is a look up for users.

<g2:ui_reference id="user_picker"
name="table_picker"
table="sys_db_object"
columns_search="false"
order_by="name"
show_popup="false" />

 I made the following changes to get the list of tables.

 

Thanks for the solution.

 

 

Right.  I was not thinking of the table name when I responded, just the tag and elements you would need to get the reference field.

Thanks Jim, you have gave me 99.99% of the answer, all I had to do was point it to the table.