cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HansHeintz
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
yashag2255
Dual Super User II
Dual Super User II

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!
v-yuxima-msft
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

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 

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (65,663)