In a PowerApp application I have a form based on a SharePoint list. On that form are two comboboxes, one to select a U.S. state and one for U.S. counties. In the associated SharePoint list the State column is a choice column, and the Counties column is a lookup column which connects to another SharePoint list that contains all of the counties in Alaska, Idaho, Oregon, and Washington in one column and their associated state in another. I would like to have the counties combobox filter based on the state that is selected in the state combobox. This code, placed on the Items parameter of the Counties combobox has gotten me part of the way there.
Filter(Choices([@Subrecipients].County), Value in Filter(Counties, State = StateField.Selected.Value).Title)
The issue I'm having is that I'm getting duplicate values for states that each have a county of the same name. For example, both Washington and Idaho have a Jefferson county. Hence, Jefferson shows up twice in the filtered Counties combobox.
Any ideas what might be going on here?