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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (822)