How to get two columns to display in a reference field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 07:57 AM
In my company we have departments with multiple divisions in each department. Many departments have the same division name, for example Administration is a division in all the departments.
I created a new division table with a reference field to Departments (cmn_department) and added the division reference field to the user table (sys_user) and form. However, I need two columns, division and department in order to differentiate which division to select. I have added attributes to the Division reference field but I'm still not getting Division and Department as columns, only Division. What am I missing?
On the User form:
1. I added Division as a reference field.
2. I selected Configure Dictionary on the division field.
3. In Advanced View I added ref_auto_completer=AJAXTableCompleter,ref_ac_columns=u_department,ref_ac_order_by=name to Attributes.
I have tried multiple variations of the attributes, none of it seems to work.
This is in Jakarta.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 08:16 AM
Hi Greta - do you want fields on your user form as follows?
division.department.<field 1>
division.department.<field 2>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 08:17 AM
Hi Greta,
Since it is a reference field it will show value of only 1 column which is display=true.
you can have more than 1 columns being shown while user types in something which is what done by ref_ac_columns attribute.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2021 02:20 AM
Hi
I also need the same thing, I am having a reference type variable in record producer, where in I have used ref_ac_columns_search=true,ref_auto_completer = AJAXTableCompleter,ref_ac_columns= u_manufacturer_other;u_product_name;u_product_version
in the variable attributes
So, in the record producer for that variable, all the 4 columns are getting displayed
But , while selecting any value its only showing the display value field. Please help me how to show 2 of the fields when selected (product name and product version along with my original display value.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2021 03:01 AM
Hi,
it would show only 1 field once selected the one which is Display=true
not possible to show 2 fields once selected unless you create custom field; add info from both the fields in that and make that as display=true
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader