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 / Understanding the logi...
Power Apps
Answered

Understanding the logic of OnChange

(0) ShareShare
ReportReport
Posted on by 8

Can someone explain this to me? I'm trying to understand the logic of Onchange when it is supposed to fire or not.

This is supposed to give the same result.. right?

let's say I have 2 controls a label1 and a slider1.

If I go to the OnChange property of Slider1 and put "label1.text=text(slider1.value)" .. it should give the 'same' result as if I would have gone in the text property of Label1 and added "text(slider1.Value)" right?

meaning if I change the slider, the onchange should trigger and change the text of the label? (I know it's better to add this immediatly in the text property of that label) But I'm trying to understand the logic here as the OnChange property doesn't seem to do anything.. I thought i was on a good way of understanding Power apps.. but now i'm feeling a bit lost as to why the onchange isn't triggering or doing anything in this case.

Thanks for your help!

Categories:
I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @NathanArch ,

     

    For OnChange of controls, it means formula will run when value of control is changed.

    For example, we can use Set, Patch, Clear on OnChange property to update variables or collection.

    The formula you are using just returns true/false, it doesn't do anything like Set or Patch function.

     

    Best regards,

    Rimmon

  • NathanArch Profile Picture
    8 on at

    I see, this clears a lot up for me.. was indeed a stupid question, thanks for your clear and swift reply.. much appreciated

  • NathanArch Profile Picture
    8 on at

    @v-mengmli-msft  One more question,

    I tried to do as you explained; I created a variable by adding on Onstart : Set(LabelText,label1.text)


    Then on the slider1 OnChange property I added : Set(Labeltext,text(Slider1.value))

    when i change the slider.. nothing seems to be happening, could you guide me as to why it would not be triggering or changing the label text property?

    thanks again for all your help

  • NathanArch Profile Picture
    8 on at

    Nevermind ,i got the solution.. 

    I should just add my variable to the text property of that label..

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 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard