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 / OnChange() issue with ...
Power Apps
Answered

OnChange() issue with 2 connected text inputs

(0) ShareShare
ReportReport
Posted on by

I have 2 input boxes:

 

TextInput1

Default: testVar1

OnChange: Set(testVar2,Value(TextInput1.Text)*2)

 

TextInput2

Default: testVar2

OnChange: Set(testVar1,Value(TextInput2.Text)/2)

 

Default:

RobinW_0-1689277699577.png

I change the 2nd box to 3 and the 1st box automatically changes to 1.5

RobinW_1-1689277728271.png

I change the 1st box to 2 and the 2nd box automatically changes to 4

RobinW_2-1689277744097.png

 

This works perfectly, however in my 2nd example:

Default:

RobinW_3-1689277889924.png

I change the 2nd box to 3 and the 1st box automatically changes to 1.5

RobinW_4-1689277943773.png

I change the 1st box back to 1, but the 2nd box stays at 3

RobinW_5-1689277967388.png

 

I'm guessing that the 1st box OnChange doesn't register because I didn't manually set it to a different value even though the formula changed it to a different value. Is there a workaround to this issue?

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,974 Most Valuable Professional on at

    Hi @RobinW ,

    That is because OnChange only triggers when the user physically changes that value (not when a Variable that happens to be the Default changes)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Verified answer
    RobinW Profile Picture
    on at

    I ended up finding a solution. Add a Reset() function to the end of OnChange.

     

    TextInput1

    Default: testVar1

    OnChange: Set(testVar2,Value(TextInput1.Text)*2); Reset(TextInput2);

     

    TextInput2

    Default: testVar2

    OnChange: Set(testVar1,Value(TextInput2.Text)/2); Reset(TextInput1);

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 462

#2
WarrenBelz Profile Picture

WarrenBelz 425 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard