I have a dropdown menu where the selected item determines the type of items that populate a gallery via another form. If someone changes the dropdown menu after adding items to the gallery, it deletes everything and starts from scratch. I would like to have a confirmation window pop up before the combobox selected item actually changes:
This is what I have so far:
1. OnChange for the dropdown box
2. Visible property for the pop up window:
On select for the confirm button of the pop up:
On select for the cancel button of the pop up:
Lastly I have the DefaultSelectedItems property of the combobox as follows:
The event fires after the box changes successfully meaning that functionally, the selected item will change, but if they press cancel, it should revert. However, even if I press cancel the combo box's value still changes.
If anyone has a suggestion of how I can implement this it would be greatly appreciated.
HI @Jsharkey ,
please find the below Approach.
Add Toggle into Screen and Set te Default Value that you are using for the OnChange properties.
(No Need to Use UpdateContext) Just Use Conditions like that If(value1=value2 ,true,false)
Now Hide the Toggle.
Now Display the popup Based on Toggle value.
Hope this solution helps you to resolve your issue.
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
The visible property for the pop up window works fine.
I'm trying to present a confirmation message when a user changes the dropdown menu selection ---> I need to change the value of the dropdown menu when the user presses a button:
When the dropdown selection changes we show the popup (the criteria here is correct and can be ignored).
Since we can't prevent the value of the dropdown from actually changing, the following executes after OnChange of the dropdown:
confirm button: keep the dropdown selection the same, update currentCategory
cancel button: change the dropdown selection back to currentCategory, don't update currentCategory
the dropdown DefaultSelectedItems: Coalesce(currentCategory, Parent.Default)
The problem with the above is that for some reason when I press the cancel button, the dropdown item does not revert to the previously selected item. It remains changed.
Desired functionality:
- Dropdown currently selected item is "Customer"
1. Change dropdown to "Contractor" dropdown, confirmation appears
2. Click the cancel button indicating we would not like to change.
3. The dropdown reverts back to "Customer"
Current functionality:
- Dropdown currently selected item is "Customer"
1. Change dropdown to "Contractor" dropdown, confirmation appears
2. Click the cancel button indicating we would not like to change.
3. (The issue) The dropdown does not revert back to "Customer"
Hi @Jsharkey ,
On Pop cancel button dont change the value just reset the combobox, that will reset the defaultselectedValue.
Try this once.
Thanks
tried the suggested:
Reset(cboCategory) does not work.
Because the combobox is inside of a form, I cannot reset it from outside of the form (the cancel button is outside of the form)
Thanks,
Josh
Ohk Then .Last Option Tried and Test with Form.
For reference -
Thanks
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
50 | |
43 | |
30 |
User | Count |
---|---|
258 | |
126 | |
87 | |
85 | |
82 |