Hi All,
I have a datacard which has a single line of Text field in my Powerapps newform named Country. When user clicks inside that textarea and key-in, autocomplete gallery shows below the textfield, which includes some suggestions for Country.
However, once user clicks outside that text area, I need to hide that autocomplete gallery. Any idea how to achieve this in powerapps ?
Is there any SetFocus (or) LoseFocus to achieve this in Powerapps ?
This answer really works for me to control a lose focus in my textbox.
Using a giant box transparent and only have to move it to front when user clicks on textbox, but when user clicks on giant box, I only have to reset textbox and move the giant box to back. really thank you
The only thing that faintly comes to mind is putting a giant empty control that spans the whole screen and positioning it behind the Textbox Control, and in the OnSelect of that giant Control, do what you would rather do in an OnBlur of the actual Textbox Control, to compensate for the fact that there is no OnBlur. This was the line of thinking we meant about "may be possible with some sort of workaround." You would want to position the giant Control carefully - position it behind the textbox, but also position it in front of any other Controls that still need to take input - and those controls when in front when clicked OnSelect need to have those formulas to also hide the textbox in that case (then anything else it needs to do) if these other controls end up being possible to click during this autocomplete operation. We can not think of anything else.
There may be yet another sort of workaround way like the above - another member on this forum is welcome to suggest any one or more ways we might have overlooked, but we cannot think of anything else other than the above.
Ok. In onselect, I can make my autocomplete gallery visible. However, Once i click outside that textbox, the autocomplete gallery should be hidden. I can't use OnSelect here right ?
Not supported. It may be possible with some sort of workaround (we are not sure what to suggest in your case though) - but it is not supported directly.
OnSelect can be used to approximate OnFocus currently.
There is no OnBlur or equivalent in Power Apps that we know of.
Can consider to upvote this idea here for consideration for future release:
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional