web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SetFocus/LoseFocus ava...
Power Apps
Unanswered

SetFocus/LoseFocus available in powerapps ?

(3) ShareShare
ReportReport
Posted on by 603

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 ?

 

 

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Iantaylor2050 

     

    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:

     

    Add OnBlur Event Support 


  • Iantaylor2050 Profile Picture
    603 on at

    Hi @poweractivate 

     

    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 ?

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Iantaylor2050 

     

    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.

  • jemendozaf Profile Picture
    2 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard