Reference fields on cat items in the service portal / employee center

Jamsta1912
Tera Guru

Hello all,

 

I have a cat item where users select a value in a reference field ('Access required', below). I've noticed that in the service portal, only the display value of the records they can select are displayed. In the 'native' UI, other columns can easily be added to the list view. I have a requirement where some additional info needs to be displayed while they're making their selection - essentially a short description of what each option actually means.

 

portal_ref_field.png

 

Ideally I'd like it to work much as it does in the native UI, so that the additional info is displayed alongside the name of each selectable item. Another option would be hover text. If it can't be done during selection (i.e. before they've actually made the selection) then I'd like them to be able to view the additional info after they've made the selection, perhaps again as hover text.  If hover text isn't possible, the preview (clicking the 'i') should just display the name of the item plus the field with the additional info. I've created a sys_popup view for the form with just those two fields, and again this works fine in the native UI but isn't honoured by the preview in the portal. Any suggestions?

3 REPLIES 3

Tanushree Maiti
Tera Patron

Hi @Jamsta1912 

 

 

  • Navigate to your specific Catalog Item 
  • Open the Variables related list and select your Reference type variable.
  • Switch to the Type Specifications tab.
  • Locate the Variable Attributes field and enter your comma-separated attributes. 

 

 

ref_ac_columns=u_variable_1;name;u_variable_2,ref_ac_columns_search=true,ref_auto_completer=AJAXTableCompleter

 

Note : "u_variable_1;name;u_variable_2" These you replace by your reference table column including Display= true   one.

 

Save it.

 

Then test it from catalog form.

 

Refer: KB2633984 Variable attribute : ref_ac_columns doesn't work as expected for reference field 

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Gangadhar Ravi
Giga Sage

@Jamsta1912 

You need to add additional attribute in variable to display this information in portal. Please refer bellow post 

 

https://www.servicenow.com/community/developer-forum/variable-attributes-in-service-portal/m-p/14434...

 

Please mark my answer correct and helpful if this works for you.

Teja R
Kilo Sage

Hi @Jamsta1912 ,
Use this in the variable attribute.

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=location;email,ref_ac_columns_search=true

TejaR_0-1781110767525.png

Output:

TejaR_2-1781110938088.png

If my response helped, please mark it as helpful and accept the solution.

 

Thanks,
Teja.