cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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 III
Dual Super User III

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 III
Dual Super User III

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

Highlighted
Helper V
Helper V

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.

Highlighted
Dual Super User III
Dual Super User III

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,243)