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 / Using Toggle as Positi...
Power Apps
Unanswered

Using Toggle as Positive/Negative instead of On/Off and update SharePoint List

(0) ShareShare
ReportReport
Posted on by 6

In aim to make this app more user friendly I wish to have a toggle that when checked returns "Positive" and when unchecked returns "Negative" when form is submitted.  Before I built this as a drop down list.  

 

How do I link this toggle to the column in SharePoint list to return Positive or Negative dependent on how the toggle is selected?  I have already changes FalseText to Negative and TrueText to Positive.

 

DIYworkitoutMan_0-1634041878644.png

 

Thank you in advance

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @DIYworkitoutMan 

    Consider changing the formula in your Update property (assuming from the look of your picture that this is in a Form), to the following:

       If(yourToggleControlNameHere.Value, "Positive", "Negative")

     

    I hope this is helpful for you.

  • DIYworkitoutMan Profile Picture
    6 on at

    @RandyHayes 

     

    Thank you for your quick response.  I may sound dim here but I cannot find the Update property for the toggle anywhere.  Am I looking in the right place?

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @DIYworkitoutMan 

    Please confirm that your controls are in a Form, or better yet, how are you submitting the data in the screen to your datasource?

  • DIYworkitoutMan Profile Picture
    6 on at

    @RandyHayes 

     

    I inserted a toggle to the screen to replace a dropdown that was in the form.  I did the same for the radion's. My data source is a SharePoint list.  This is the code I am using on a submit button,

     

    Patch('Safety Observations', Defaults('Safety Observations'), Form1.Updates, Form3.Updates);

    Notify("Observation Saved",NotificationType.Success);

    ResetForm(Form1); ResetForm(Form2); ResetForm(Form3);

    Navigate(BrowseScreen1);

     

    DIYworkitoutMan_0-1634047437673.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @DIYworkitoutMan 

    You should not be using a Patch function on forms!  SubmitForm is what you need.  If you are splitting a form to multiple screens then I would advise doing that in a way that does NOT break the function of the Form.  Take a look at this video on that process.

     

    Your formula makes assumptions that it should not - particularly, you are Patching and then notifying that it was a success...what if it was not??  The form provides the OnSuccess and OnFailure actions to account for those conditions properly.  But, if you use Patch on the Updates of the forms, then you lose all of that functionality.

     

    Now, for the Toggle, it will be in a datacard in your form.  The datacard has an Update property which is where you would use the formula that I originally provided.

     

  • DIYworkitoutMan Profile Picture
    6 on at

    @RandyHayes Thank you for your support.  First ever app and I definitely was making this far too difficult for my own good.  Works like a charm.

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @DIYworkitoutMan 

    Excellent!  Yes...always keep it simple in PowerApps and your experience will be much better.  Keep in mind that PowerApps is a design platform that revolves around the principles of Excel.  Think Excel all the time with formulas and referencing other cells - in PowerApps case, referencing controls.

     

    If you're good now at this point, please go back and check the post that helped resolve your problem as "accept solution" to close this out and help others fine the similar answer if they have the same problems.  Thanks 🙂

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard