How to get filtered values based on initial dropdown selection in Apps

From Data service , I have two columns as dropdowns in Apps.
ex: if I select state column dropdown , how will I narrow down to list of cities for that specific states.

@Ana_Patricia ,

Please enable your two dropdown and into second drop down city goto Query builder and into Query builder you can add filter and in filter left you can add column name and right side you can add ..Selected Value.

Thanks,
Arvind

Thanks Arvind , But do we have these options in Legacy Apps?
I was trying through Events on dowpdown selection

@Ana_Patricia ,

you can do same approach into legacy. Apply filter on function.

I have created two entities in the data service -
1 - “State”
image

2 - “Cities”
image

Then create first dropdown with the states , bind the selected value to a variable (for eg. initValue) . Then , filter cities where state name = initValue as the source of second dropdown.

Let me know if that helps !

Thank you.