- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 12:35 AM
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?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 12:49 AM
@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.
You can read more about reference qualifier here https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/script/server-scripting....
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2024 12:49 AM
@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.
You can read more about reference qualifier here https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/script/server-scripting....
Hope this helps.