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 / Change Toggle Value Ba...
Power Apps
Unanswered

Change Toggle Value Based on Condition and after clicking of buttons

(0) ShareShare
ReportReport
Posted on by 6

Hi, 

 

I am trying to create a form with a gallery and a toggle control. The value of the toggle will change to true if the database qty matches with the textbox value. However, the toggle will only change right after clicking the submit button. 

Database QTY = lblsystemcount.Text

Input QTY = textcountnew.Text

I can do it if I encode the formula in the Toggle Default property but it will immediately change the toggle value. 

Requirement is for the toggle value to change only when button is selected or pressed.

 

 

Form.PNG
Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    Set a variable on button click and change the default to the variable.

     

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

  • iamquicho90 Profile Picture
    6 on at

    Form.PNG

  • iamquicho90 Profile Picture
    6 on at

    To add:
    1. The user will input the count, but no change on toggle yet will remain as is
    2. The user will click submit button
    3. Toggle will change based on the condition between textcountnew.Text and lblsystemcount

    iamquicho90_0-1664438282693.png

     

  • iamquicho90 Profile Picture
    6 on at

    Hi @phipps0218 ,

    I already tried setting the variable in the button, but somehow my condition is not returning the desired outcome
    Please see below
    Submit Button code

    iamquicho90_0-1664440879263.png

    Toggle Default Value

    iamquicho90_1-1664440950229.png

     

    All Toggle Values are set to false, 2nd line should be green or true

    iamquicho90_2-1664441015705.png

     




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 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard