Service Catalog : how to display the Street, zip code, mobile number in the location variable displa

vasant Cool
Mega Guru

Service Catalog : 

I reference the location table and the Name attribute is displaying in the drop down. (screen shot below)

Requirement :: When user click on the Location field the drop down should display the Street, Country, ZIp Code etc.. How to Achieve this ?

 

vasantCool_0-1682585761001.png

 

1 ACCEPTED SOLUTION

@vasant Cool 

I did something similar to reference variable to CI table

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=category;serial_number,ref_ac_columns_search=true,ref_ac_order_by=name

Variable attributes sections

AnkurBawiskar_0-1682587009778.png

 

Output: I have added category and serial_number as extra fields to be shown along with name

AnkurBawiskar_1-1682587009782.png

 

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Rahul Kumar17
Tera Guru

Hi,

 

To achieve this requirement, you can create a UI Policy on the Location field of your form, which will override the default behavior of the field. Follow the below steps:

  1. Open the form for the table where the Location field is present.
  2. Click on the gear icon on the top right and select Configure > UI Policy.
  3. Click on the New button to create a new UI Policy.
  4. Enter a name for the UI Policy, for example, "Display Address Details in Location Dropdown".
  5. Under the Conditions tab, set the condition to "Location is not empty".
  6. Under the Actions tab, set the action to "Show" and select the fields that you want to display in the dropdown, for example, Street, Country, Zip Code, etc.
  7. Save the UI Policy.

Now, when the user clicks on the Location field, the dropdown will display the additional fields that you selected in the UI Policy.

 

Thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar

Ankur Bawiskar
Tera Patron
Tera Patron

@vasant Cool 

you can add the ref_ac_columns attribute

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=street;country;zip,ref_ac_columns_search=true,ref_ac_order_by=name

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@vasant Cool 

I did something similar to reference variable to CI table

ref_auto_completer=AJAXTableCompleter,ref_ac_columns=category;serial_number,ref_ac_columns_search=true,ref_ac_order_by=name

Variable attributes sections

AnkurBawiskar_0-1682587009778.png

 

Output: I have added category and serial_number as extra fields to be shown along with name

AnkurBawiskar_1-1682587009782.png

 

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Perfect, i was able to adapt this to help with a use case i had that was similar, thank you.