cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

ondeselect style action

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.

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: ondeselect style action

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.

Highlighted
New Member

Re: ondeselect style action

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.

Highlighted
Super User III
Super User III

Re: ondeselect style action

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.
Highlighted
New Member

Re: ondeselect style action

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.

Highlighted
Super User III
Super User III

Re: ondeselect style action

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,227)