Show location based on region

Anna_Servicenow
Tera Guru

I have 2 fields in service portal, location and region. Location refers cmn_location table and region has 5 choice.

If i select region(say ASIA) it should show all asian region location in cmn_location field. How to achieve this

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Is region also a field on cmn_location and are the values same for region field on location table and region varibales if yes then in the location variable please use the below code in the reference qualifier:-

 

javascript:'replaceregionfield='+current.varibales.replaceregionvaribalename

 

Saurav11_0-1669534902096.png

 

Please mark my answer as correct based on Impact.

View solution in original post

7 REPLIES 7

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Is region also a field on cmn_location and are the values same for region field on location table and region varibales if yes then in the location variable please use the below code in the reference qualifier:-

 

javascript:'replaceregionfield='+current.varibales.replaceregionvaribalename

 

Saurav11_0-1669534902096.png

 

Please mark my answer as correct based on Impact.

Anna_Servicenow
Tera Guru

Hi,

 

Both variables are from cmn_location table. I am not clear with the solution though.

What i need is when user selects a region in the form, related location has to be shown

Yeah when you say related location ahs to be shown you mean it should be shown in the list for selection or should it get autopopulated.

 

If it should be shown for selection yes as I mentioned earlier you can use reference qualifier and it will work. If it does not please share screenshot of both the region and location field on catalog as an well as form.

 

Please mark my answer as correct based on Impact.

 

 

 

 

Since i have only 5 region i am trying to use a drop down. So from the region drop down if i select asia, it should show all location that has region as asia and it should be selectable