Patch Power Apps Radio Button Value to SharePoint List

Do you know how to patch Power Apps Radio button value into SharePoint list? This Power Apps tutorial explains everything about patching a Power Apps radio button data to a SharePoint list. Like:

  • How to patch Radio button value from blank Canvas app to SharePoint list
  • Patch Radio button data from Power Apps Customize forms to SharePoint list

Patch Power Apps Radio Button Value to SharePoint List

Here, we will discuss patching the Radio button value from a blank Canvas app to a SharePoint list with a simple example:

Example:

I have a SharePoint Online list named “Project Status List,” which contains the following fields.

Column NameData Type
Project NameDefault single line of text
Is ApprovedChoice
How to Patch radio button value into sharepoint list

In Power Apps, I have manually added a Text input, Radio button, and Button control, and the Radio button has Yes/No values.

patch radio button selected value to sharepoint list

When a user submits a new record, including selecting a radio button value, it will be submitted to the SharePoint list, as in the screenshot below.

patch radio button selection to sharepoint list

To achieve this example, follow the below steps. Such as:

1. Create a Blank Canvas app -> Connect it to the respective SharePoint list like below.

How to patch data from radio button to sharepoint list

2. On the Power Apps Screen -> Insert a Text input control to add a Project Name -> Add a Radio button control and set its Items property as:

Items = ["Yes","No"]
How to patch data from radio button control to sharepoint list

3. Then, insert a Button control and set its OnSelect property to the code below.

OnSelect = Patch(
    'Project Status List',
    Defaults('Project Status List'),
    {
        Title: txt_ProjectName.Text,
        'Is Approved': Radio_Approved.Selected
    }
);
Reset(txt_ProjectName);
Reset(Radio_Approved)

Where,

  • Patch() = This Power Apps Patch() function is used to update records in a Data source instead of the Edit form
  • ‘Project Status List’ = SharePoint Online list
  • Defaults() = This function returns a record that contains the default values for the data source
  • Title, ‘Is Approved’ = SharePoint list fields
  • txt_ProjectName = Power Apps Text input control name
  • Radio_Approved = Power Apps Radio button name
patch data from radio button control to sharepoint list

4. Save, Publish, and Preview the app. Whenever a user enters a new record using text input and the Radio button, he/she clicks on the button control to submit data into the SharePoint list.

patch data from radio button to sharepoint list

This is how to patch a Radio button value from a blank Canvas app to a SharePoint list.

Patch Radio Button Data from Power Apps Customize Forms to SharePoint List

Let’s see how to patch Radio button data from Power Apps’s Customize forms to the SharePoint list.

Example:

I will also take the same SharePoint Online list [Project Status List] for this example.

Now, I want to integrate this list into Power Apps’ customized form and submit Radio button data from the Power Apps form to the SharePoint list.

Refer to the below screenshot:

How to Patch radio button data into sharepoint Online list

To work around this example, follow the below steps.

1. Open the Power Apps list -> Expand the Integrate dropdown -> Select Power Apps -> Click on the Customize forms as in the screenshot below.

Patch radio button values into sharepoint online list

2. On the Power Apps FormScreen -> Click on the SharePointForm1 -> Select ‘Is Approved_DataCard’ where we will get the Combo Box control to select the SharePoint choice field.

How to Patch radio button values into sharepoint list

3. But, it is the not right way to select a choice field. We can use a Radio button control instead of a Combo Box control.

4. For that, copy the Combo Box DataCardValue and Items property, then remove it. Now, insert a Radio button control inside this DataCard and change its DataCardValue and Items property using Combo Box properties, as shown below.

Items = Choices([@'Project Status List'].'Is Approved')
How to Patch radio button values into sharepoint online list

5. Also, select the Radio button control and set its Default property as:

Default = ThisItem.'Is Approved'.Value
Patch radio button values into sharepoint list

6. Save, and Publish the app -> Back to the SharePoint list -> Click on the + New button to directly submit the Radio button data from the Power Apps form to the SharePoint list, as in the screenshot below.

Patch radio button data into sharepoint list

7. Also, if you want to display or edit the existing item details, click on the respective item to display or edit that item, like below.

How to Patch radio button data into sharepoint list

This is how to patch Radio button data from Power Apps’s Customize forms to the SharePoint list.

Conclusion

The Power Apps Patch() function is used to update records in a Data source instead of the Edit form.

Here, from this Power Apps tutorial, I explained everything about patching a Power Apps radio button data to a SharePoint list, including:

  • How to patch Radio button value from blank Canvas app to SharePoint list
  • Patch Radio button data from Power Apps Customize forms to SharePoint list

You may like the following tutorials: