cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pwrappr01
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
yashag2255
Dual Super User II
Dual Super User II

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
yashag2255
Dual Super User II
Dual Super User II

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

@yashag2255,

 

That worked! Thank you very much for your help.

Perfect! Happy that it worked for you. 

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,568)