Two Fields Referencing the Same Table: Different Lookup Views Possible?

yana7
Tera Contributor

"I have two fields that reference the same table" This part explains that you have two different fields (e.g., "Employee" and "Manager") in your ServiceNow form. Both fields pull data from the same underlying table (e.g., the "User" table).

1 ACCEPTED SOLUTION

Kamal17
Kilo Sage

@yana7 I have seen similar requirements in the past. But so far I didn't see any option to do this for list view.

Usually, as a workaround I recommend using reference field auto-complete pop-up. In that, we can control the columns that are displayed by using "ref_ac_columns" attribute in the dictionary.

 

For E.g., Right click on the "Employee" field and select 'Configure Dictionary'. Switch to 'advanced' view. In the 'Attributes' field add the value "ref_auto_completer=AJAXTableCompleter;ref_ac_columns=column1;column2;column3"

 

However, if you also prefer to do something similar for a form popup view while clicking the reference icon. Then you can refer to the below article.

https://www.servicenow.com/community/now-platform-blog/how-to-customize-fields-displayed-on-the-refe...

 

PS: Hit "Correct", "Helpful" or "Like" depending on the impact of the response.

Regards,

Kamal S

View solution in original post

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@yana7 If you are referring to the columns shown when one uses the reference field then they can be controlled using ref_ac_columns. For more information please refer to https://www.servicenow.com/community/hrsd-forum/what-is-ref-ac-columns-and-how-to-use-it/m-p/2629677....

Kamal17
Kilo Sage

@yana7 I have seen similar requirements in the past. But so far I didn't see any option to do this for list view.

Usually, as a workaround I recommend using reference field auto-complete pop-up. In that, we can control the columns that are displayed by using "ref_ac_columns" attribute in the dictionary.

 

For E.g., Right click on the "Employee" field and select 'Configure Dictionary'. Switch to 'advanced' view. In the 'Attributes' field add the value "ref_auto_completer=AJAXTableCompleter;ref_ac_columns=column1;column2;column3"

 

However, if you also prefer to do something similar for a form popup view while clicking the reference icon. Then you can refer to the below article.

https://www.servicenow.com/community/now-platform-blog/how-to-customize-fields-displayed-on-the-refe...

 

PS: Hit "Correct", "Helpful" or "Like" depending on the impact of the response.

Regards,

Kamal S