Feb 09 2022 03:36 AM - edited Feb 09 2022 03:38 AM
I have the following 3 SharePoint lists:-
1) Country List
2) City List. Contain a Lookup field named Country >> which reference the Country list.
3) Location List. Contain a Lookup field named City >> which reference the City list.
Now i am customizing the Location list SharePoint form using power apps. and since i am not storing the Country inside the Location list >> so added a Country Combo Box inside the form, as follow:-
now i want to cascade the City list based on the Country selection, so inside the Country Combo box field's Items property i added the following formula:-
AddColumns(Country As _country,"_cities",Filter(City_1, Country.Id = _country.ID))
and inside the City ComboBox field's Items property i added the following formula:-
ComboBox3.Selected._cities
now i will get the cascade effect on the City list.. but i am facing these 2 issues:-
1) When i edit an item >> the City list will only show the current selection, and will not show all the cities for the current Country as follow:-
So the city Combo Box will be as if it is a Text field and not a list.. now only if i change the Country option >> the City list will be populated correctly.
2) Second issue >> when i edit an item >> and i change the Country >> the current City selection will still be show.. so i will have a City that does not belong to the newly selected Country.. so how i can clear the current City selection when choosing another Country?
Thanks in advance for any help.