cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pwrappr01
Level: Powered On

How can I pass a toggle selection to a SharePoint edit form toggle for a YES/NO column?

I have a YES/NO column in a SharePoint list that uses custom text. I would like to use a PowerApps toggle to set the value on the YES/NO. However, when I submit a new item to the list, it does not show the value I selected using the toggle. How do I pass the toggle selection to the SharePoint List?

 

I know I probably need a variation on the following (which I do not understand but have used with much success) for a toggle like this:

 

{'@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:Input.Selected.ID,
Value:Input.Selected.'List'
}

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: How can I pass a toggle selection to a SharePoint edit form toggle for a YES/NO column?

Hi @pwrappr01 , 

 

For a Yes/No column, if you want to select Yes then you must send the value as true, or else send a false.
 
Now if you are using an Edit Form, please check you Update field is set to <<ToggleButton>>.Value 
 
If you are not using a Edit form, and want to patch the data out of a text Input and a toggle box, please refer to screenshot.
Patch(YashTest01,Defaults(YashTest01),{Title:TextInput1.Text,ToggleButton:Toggle1.Value})
Here YashTest01 is my SP list and Title & ToggleButton are its columns/attributes.MicrosoftTeams-image (50).png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

3 REPLIES 3
Highlighted
Dual Super User
Dual Super User

Re: How can I pass a toggle selection to a SharePoint edit form toggle for a YES/NO column?

Hi @pwrappr01 , 

 

For a Yes/No column, if you want to select Yes then you must send the value as true, or else send a false.
 
Now if you are using an Edit Form, please check you Update field is set to <<ToggleButton>>.Value 
 
If you are not using a Edit form, and want to patch the data out of a text Input and a toggle box, please refer to screenshot.
Patch(YashTest01,Defaults(YashTest01),{Title:TextInput1.Text,ToggleButton:Toggle1.Value})
Here YashTest01 is my SP list and Title & ToggleButton are its columns/attributes.MicrosoftTeams-image (50).png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

pwrappr01
Level: Powered On

Re: How can I pass a toggle selection to a SharePoint edit form toggle for a YES/NO column?

@yashag2255,

 

That worked! Thank you very much for your help.

Dual Super User
Dual Super User

Re: How can I pass a toggle selection to a SharePoint edit form toggle for a YES/NO column?

Perfect! Happy that it worked for you. 

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,417)