Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 1QYRF0Mpsxcagbu4WV6bux
Power Apps - Building Power Apps
Unanswered

SetFocus/LoseFocus available in powerapps ?

Like (3) ShareShare
ReportReport
Posted on 6 Dec 2020 07:47:51 by 494

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:
  • jemendozaf Profile Picture
    2 on 16 Apr 2022 at 07:32:11
    Re: SetFocus/LoseFocus available 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

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on 06 Dec 2020 at 08:09:25
    Re: SetFocus/LoseFocus available in powerapps ?

    @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.

  • Iantaylor2050 Profile Picture
    494 on 06 Dec 2020 at 08:03:37
    Re: SetFocus/LoseFocus available in powerapps ?

    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 06 Dec 2020 at 08:01:42
    Re: SetFocus/LoseFocus available in powerapps ?

    @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 


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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started