CMN_LOCATION reference fields

VikramM1
Tera Contributor

Hi,

 

I have created four fields for all Country, City, State, Address and Taking Cmn_loaction Reference for all four fields.

 

When i select country: only country should be displayed. But, its displaying  address.

When i select State: based on the country selected state should only be displayed.

When i select City: Based on country and state selected. City should only display.

 When i select Adress: Based on country and state and city selected. address should be display.

 

But, all are showing only address.

 

How to acheive this in service now table form. Can someone help me on this?

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@VikramM1 You need to add following reference qualifier on your fields.

 

1. Country field:

javascript:'cmn_location_type=country'

2. State

javascript: 'country='+current.variables.country

3. City

javascript: 'country='+current.variables.country+'^state='+current.variables.state

 4. Address

javascript: 'country='+current.variables.country+'^state='+current.variables.state+'^city='+current.variables.city

 

Here is how the reference qualifier should look on address field. Similarly configure for others.

 

Screenshot 2024-04-02 at 1.18.24 PM.png

 

You can read more about reference qualifier here https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/script/server-scripting....

 

Hope this helps.

 

View solution in original post

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@VikramM1 You need to add following reference qualifier on your fields.

 

1. Country field:

javascript:'cmn_location_type=country'

2. State

javascript: 'country='+current.variables.country

3. City

javascript: 'country='+current.variables.country+'^state='+current.variables.state

 4. Address

javascript: 'country='+current.variables.country+'^state='+current.variables.state+'^city='+current.variables.city

 

Here is how the reference qualifier should look on address field. Similarly configure for others.

 

Screenshot 2024-04-02 at 1.18.24 PM.png

 

You can read more about reference qualifier here https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/script/server-scripting....

 

Hope this helps.