cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Text edit onchange not firing when typing

I have some labels reflecting fields of a table from the record that is located based on a text input.
If I fave the labels text property lookup the input text value in the databse all goes well while typing.

But I would prefer to set a record when a value is typed.

All the labels can then get their values from the record and there has to be only one locate (more efficient)
So i thought I put a set(MyRecord;locate...) in the onchange property of the text input.

But now my labels do not change (they do if I put the code in the onselect property and click on the input).

If I change another label, meant for debugging, inside the onchange code: it does not change.

So it seems the onchange code is not firing at all.

Probably making some powerapps beginner thinking error. But which?

4 REPLIES 4
Highlighted
Dual Super User III
Dual Super User III

Hi @HansHeintz 

 

This might be happening because the OnChange property of a text input, gets triggered when you click outside of the control, somewhere else on the screen.
 
If you want to refresh the labels as soon as the change is made in text input, you might want to change the label properties based on TextInput.Text rather than setting up the OnChange property.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Community Support
Community Support

Hi @HansHeintz 

 

Could you please share more details of your issue?

What are your controls' setting and what are their formula expressions?

Could you please show the issues by screenshots?

Could you please reference this?

https://powerusers.microsoft.com/t5/General-Discussion/Set-Control-Value-Text-OnChange/td-p/5780

 

Best Regards.

Yumia

Highlighted
Anonymous
Not applicable

Hi @HansHeintz how are you progressing with this? Can you review the above replies and update the thread if they were helpful? 

 

Thank you,

 

@Anonymous 

Highlighted

I have abandonned the idea that onchange works like I am used to in other programming languages (something that triggers when someone changes the control) and tried to work around it. Specifically: if I have an input and I want the behaviour of certain controls to change according to the input: is it a date or is it a number? I would have hoped that in onchange I would change a variable based on the format of the current value (is it 99-99-9999 or not?) and have other controls react to this variable. In stead of this now in every control/object that depends on this I do the check like this

If(IsMatch(SearchBoxDocanummer.Text;Digit & Digit & Hyphen & Digit & Digit & Hyphen & Digit & Digit & Digit & Digit) again and again.

Also if I change the text of a searchbox and I want every control to dynamically react to what I type and those controls are fields of a record what I hoped that in the onchange I find the record and in the controls I would set: Myrecord.name and Myrecord.breed etc. In stead now in every control, I do a lookup(table;value(input.text)=id;name) lookup(table;value(input.text)=id;breed) etc which seems like making it all slower but alas I have to live with that.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (10,164)