Let's say you have two dropdowns (both linked to the same SharePoint list). The list has two columns: Categories and Problems. In PowerApps, you have the option to make a dropdown dependent on another dropdown to limit the visible options. So you have two drop downs: one for Categories and one for Problems. You make Problems dependent on Categories and use a filter formula to limit available Problems only to the chosen Category.
Here's the problem. You put a formula into the OnChange function of the Problems dropdown to save some data into a variable. Now, try selecting something different in the Category drop down. The OnChange of the Problems dropdown never fires. This is what I mean by "OnChange of cascading dropdown does not activate". The OnChange function of the Categories drop down will work, since you choose it manually. But it seems that programmatic firing of the OnChange event handler does not happen. This is a problem, because if the user wants to stay with the first option presented in the Problems dropdown, they will never manually change the Problems drop down. (Note that the Problems drop down visually changes, it just doesn't fire the OnChange event.)
Can we confirm what Control you are actually using?
Is it a "DropDown", or is it a "ComboBox"?
Annoyingly - these 2 controls have different behaviours, with one being the opposite of the other.
It would seem that for a "DropDown", the OnChange event does NOT fire when the selected value is changed programatically (including when a form resets)
However, for a ComboBox - the OnChange event DOES fire when the selected value is changed programatically, or on Form Reset, when the ComboBox is in a form. Note that the OnChange event does NOT fire off if the SearchText is changed - only when a valid result is picked.
It is also worth noting that the ComboBox.OnChange event actually fires BEFORE the item is selected, so be careful using "ComboBox.Selected" in the OnChange event - it will give you what the ComboBox USED to be set to, NOT what it is actually changed to...
There are all sorts of errors, bugs and inconsistencies in the PowerApps controls - A typical example of many Silo'd teams working on different controls for PowerApps - things that should work the same way work differently for different controls, or simply not at all.
Another good example is the ListBox Control - you can have "Multi-Select = true", but there is no way to set multiple "SelectedItems" like in a Drop-down or ComboBox. Although, even that doesn't work correctly for ComboBox or DropDown - it only sets the DISPLAY Selected Items, it doesn't actually set the "SelectedItems" Property of the control that can be consumed at runtime.
Between these bugs, and the inability to manage the RACE conditions of Asynchronous functions, PowerApps is pretty much unusable for any decent sized project, and only suitable for smaller "helper" Apps. Such a shame really, as without these glaring (and dare I say "Schoolboy") errors, it could be such a good platform...
Indeed, I was using the Dropdown, and not the ComboBox because in that scenario, users should not have been able to search for options. Thank you for your analysis, it is good to know that the ComboBox can technically be used the way I wanted to use a dropdown. In the end, it might be better for me to just create a dropdown myself, using a gallery.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.