I have a gallery with on each row a button. The button activates updates to the database (sharepoint lists).
When the user clicks a button somewhere (in a row) in the gallery all buttons must be set to 'disabled'. All buttons must be 'editable' again when the update is completed.
Currently the button that is selected will be disabled until the update is completed, however all other buttons are active during that proces. The database is updated incorrectly when the user hits another button during update of the previous selected button. That's why I want to set the buttons to 'disable' during the update.
Any ideas how to do that?
Thanks in advance
Solved! Go to Solution.
Hi @RonHappel
Ok, you mentioned this was in a gallery so that makes things easier:
On your button's OnSelect, you have it performing the update, so if you add this line before that:
Set(ThisButtonPressed, true);
and then the last line of the button's OnSelect (after your patching/update code) you should have:
Set(ThisButtonPressed, false);
Then for the DisplayMode of your Button, have it as:
If(
ThisButtonPressed,
DisplayMode.Disabled,
DisplayMode.Edit
)
If you have any questions about this please feel free to ask 😺
Cheers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Thanks,
I will try this tomorrow perhaps.
I'm not sure because it's Christmas.
Happy Holidays,
Ron.
Hi @RonHappel
Ok, you mentioned this was in a gallery so that makes things easier:
On your button's OnSelect, you have it performing the update, so if you add this line before that:
Set(ThisButtonPressed, true);
and then the last line of the button's OnSelect (after your patching/update code) you should have:
Set(ThisButtonPressed, false);
Then for the DisplayMode of your Button, have it as:
If(
ThisButtonPressed,
DisplayMode.Disabled,
DisplayMode.Edit
)
If you have any questions about this please feel free to ask 😺
Cheers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Thanks,
I will try this tomorrow perhaps.
I'm not sure because it's Christmas.
Happy Holidays,
Ron.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
81 | |
50 | |
38 |
User | Count |
---|---|
303 | |
249 | |
124 | |
73 | |
55 |