How to create cascading dropdowns in Powerapps (canvas app)
Add data to collection button:OnSelect: Collect(MyStateCity,
{StateName:"Oregon",CityName:"Salem"},
{StateName:"Oregon",CityName:"Eugene"},
{StateName:"Washington",CityName:"Seattle"},
{StateName:"Washington",CityName:"Bellevue"},
{StateName:"Washington",CityName:"Redmond"},
{StateName:"California",CityName:"Los Angels"},
{StateName:"California",CityName:"San Francisco"},
{StateName:"California",CityName:"San Diego"}
)
Dropdown_State:Items: Distinct(MyStateCity, StateName)
Dropdown_City:Items: Filter(MyStateCity, Dropdown_State.SelectedText.Value = StateName)
Gallery:Items: If(IsBlank(Dropdown_State.SelectedText.Value),
MyStateCity,
If(IsBlank(Dropdown_City.SelectedText.Value),
Filter(MyStateCity, StateName = Dropdown_State.SelectedText.Value),
Filter(MyStateCity, StateName = Dropdown_State.SelectedText.Value, CityName = Dropdown_City.SelectedText.Value)))
Ещё видео!