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?
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?
Hi @HansHeintz how are you progressing with this? Can you review the above replies and update the thread if they were helpful?
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.
Keep up to date with current events and community announcements in the Power Apps community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!