The CreatorCon Call for Content is officially open! Get started here.

How to filter the location field

Dizy M
Tera Expert

Hi everyone! 

I'd like to ask for help on how to filter a location field.

 

How to achieve in portal that once you click the country it will show a dropdown list for state, after selecting the state it will show the metro city.

 

I already changed the type of our variable from "Reference" to  "Lookup Select Box" because the field mapping should be "country>state>Metro City>City"

 

DizyM_3-1690518421780.png

 

 

DizyM_2-1690518392855.png

 

 

Thanks in advance !

1 ACCEPTED SOLUTION

Chetan Mahajan
Kilo Sage

Hello @Dizy M ,

                              I don't think you can add this filter on single field. to give functionality to select country->state->city

either you can create Separate field and add ref qual on same if you have all those field as reference type.  OR

In Lookup select box, you can add those field in Lookup label field and use orderBycountry so it would at least All country in order with associated state  and city.

check below snap for ref.

ChetanMahajan_0-1690525798594.png

Result : It will show like this 

ChetanMahajan_1-1690525831645.png

Kindly mark correct and helpful if applicable 

 

 

 

View solution in original post

5 REPLIES 5

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Maybe this helps:

- 2021-11-24 - Article - Dependent Select Box (Choice) Variables on Record Producers (+ Multi-language!)

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi @Mark Roethof  Thank you for sharing this but is it possible to just have one field just to get this field mapping "country>state>metrocity>city" or do we really need to have a second field like in the link you've shared?

I would think that you indeed need an additional variable. Since you are selecting a country and wanting to drill down to a City. A City is not a Country. And ideally, these values would be somewhere in the Platform, in a Table or as choices, so it's not free format text.

 

Though that's really up to you.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Chetan Mahajan
Kilo Sage

Hello @Dizy M ,

                              I don't think you can add this filter on single field. to give functionality to select country->state->city

either you can create Separate field and add ref qual on same if you have all those field as reference type.  OR

In Lookup select box, you can add those field in Lookup label field and use orderBycountry so it would at least All country in order with associated state  and city.

check below snap for ref.

ChetanMahajan_0-1690525798594.png

Result : It will show like this 

ChetanMahajan_1-1690525831645.png

Kindly mark correct and helpful if applicable