Hi,
My issue is I want to disable a button if the user has entered a text field and then re-enable it once the focus is changed. In the OnSelect() method I can set the Mode of the button but there is the lack of the opposite of the OnSelect() method to reneable the button.
I tried putting the code in the OnChange() method. The start of the OnChange() method disables the button and the very last bit of code re-enables the button. However if the user is in the text field and changes some value, and then clicks the button without clicking anywhere else on the app, the onChange() method is not being executed before the button code which I need it to do.
How can I achieve this?
Solved! Go to Solution.
There was only 1 idea I could find and unfortunately it has only 1 vote. However, your vote will double that and I can upvote it for you too. https://powerusers.microsoft.com/t5/PowerApps-Ideas/OnFocus-Property/idi-p/247636
---
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."
I would suggest using this code in the DisplayMode property of your button
If(IsBlank(TextInput.Text), Disabled, Edit);
---
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."
Hi @mdevaney ,
Thanks for your reply. The code I have in the onselect is much more than just checking if a text box is blank or not.
There are X number of text boxes. The user can have them blank or filled in. What is really important is if the user changed the value of what is in the textbox(s).
Something that would really save my day is having functionality around when focus is gained and focus is lost for a text box. (onSelct & onDeSelct or something).
Sorry, there is not any ability in PowerApps to detect what control is focused on. I suggest you create a new Idea for it. https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas
---
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."
Ok, well thank you for your time! I will probably create an idea or see if one already exists.
I do hope somene in the community has a possible workaround or has done something similar though.
There was only 1 idea I could find and unfortunately it has only 1 vote. However, your vote will double that and I can upvote it for you too. https://powerusers.microsoft.com/t5/PowerApps-Ideas/OnFocus-Property/idi-p/247636
---
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."
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
208 | |
207 | |
85 | |
58 | |
35 |
User | Count |
---|---|
334 | |
259 | |
132 | |
86 | |
60 |