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 / ondeselect style action
Power Apps
Unanswered

ondeselect style action

(0) ShareShare
ReportReport
Posted on by 6

Has anyone figured out a way to string together multiple controls/variables to get to an OnDeselect style action?  I'm almost able to do what my app needs via the onselect and onchange, but it would be better if I could figure this one out.  The pattern is that if someone clicks in the text input field and then clicks out of it without changing anything, i need to fire an action - likely set() but havent confirmed for sure since i can't do it.  Any ideas?  I'm stumped...

 

Related, I even strung together ways to change the text input without triggering the onselect or onchange, but that isn't the pattern I was aiming at.

Categories:
  • eka24 Profile Picture
    20,925 on at

    Can you give an example to explain

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • NeerRaw Profile Picture
    6 on at

    without trying to explain the full scenario, the closest example i can come up with is data validation in real time.  if i have a field that requires a specific format, it may be required, or it may need to be a certain length, i want to alert someone immediately as they exit the field that they need to make a change.  I can handle most of the scenarios using on change, but if someone clicks on the field and doesn't enter something, then i can't trigger anything alerting them that they needed to.  Does that make sense?

     

    I tried using a timer that started onselect and then constantly checked if the field was blank, but it was either triggering the alert too early or too late.

  • eka24 Profile Picture
    20,925 on at

    We can use these processes:

     

    On OnSelect of each of the Fields (TextBox) set a Variable example: 

    Set(varTochedTextbox1,true)
    Set(varTochedTextbox2,true)
     
    Next Step:
    OnVisible of the Screen put:
    Set(varTochedTextbox1,false);Set(varTochedTextbox2,false)
    To ensure the variable does not take effect when user first goes to the screen
     
    Finally, Using Your Submit Button OnSelect, Put:
    If(varTochedTextbox1 Or varTochedTextbox2,Notify("Not All fieds are filled"),SubmitForm(Form1))
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • NeerRaw Profile Picture
    6 on at

    thanks for trying, but that isn't it.  there is no submit button in the scenario.  i need it to trigger as soon as someone leaves the field, not on taking another action, like clicking a submit button.

  • eka24 Profile Picture
    20,925 on at

    I have some test on it:
    1. Insert a Label1 and put some text in it example "You have not filled Some Textboxes"

     

    2. Set a variable OnVisible of the screen:  

    Set(varTochedTextbox1,false);Set(varEmptyTextbox,DataCardValue6.Text)
    Replace DataCardValue6 with your textbox
     
    3.In the DataCardValue6 that has to be completed by the user put:
    Set(varTochedTextbox1,true)
     
    4.Finally in the Visible of Label1:
    If(varTochedTextbox1&&IsBlank(varEmptyTextbox),true,false)
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard