How to display only the states that are available in the selected country and if the state has selec

Archana23
Tera Contributor

How to display only the states that are available in the selected country and if the state has selected to XYZ , only cities in that state should be displayed in the below variables.

 

Please suggest.

 

Archana23_0-1717656269326.png

 

2 REPLIES 2

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hello @Archana23 

This can be achieved with reference qualifier. Same requirement is answered in below thread:

https://www.servicenow.com/community/developer-forum/state-should-display-based-on-country-selected-...

Refer:

https://youtu.be/zvSwzPRgAbw?si=vfaFU5V8YTirPn76

Please Mark this answer as helpful and correct if helped.

Kind Regards,

Ravi Chandra.

ayan_murshad
Tera Guru

You have to write advanced reference qualifier on both field

For example 

State - javascript:"country="+current.variable.country;
Cities - javascript:"state="+current.variable.state;

 

Regards,

Ayan Murshad