How to Save Power Apps Dropdown Selected Value to SharePoint List? [2 Different Ways]

Last week, I tried entering Microsoft 365 group names into the Power Apps dropdown control. After doing so, I must submit the selected group name in the Power Apps dropdown to the SharePoint list. I achieved this with the help of the Patch() function in Power Apps.

In this article, I will show you how to save Power Apps dropdown selected value to SharePoint list.

Save Power Apps Dropdown Selected Value to SharePoint List

We can save the Power Apps dropdown selected value to the SharePoint list in two different ways. They are,

  • Using the Patch() function [When the dropdown is not in Power Apps form].
  • Using dropdown.Selected.Value [When dropdown is present in Power Apps form].

In the examples below, I will explain the two ways of saving the Power Apps dropdown selected value to the SharePoint list.

Saving Power Apps Dropdown Selected Value to SharePoint List Using Patch() Function

I have a SharePoint list here that stores the details of projects assigned to the office groups.

How to save dropdown values to Sharepoint list
Column NameData Type
Project NameTitle(Single line of text)
Office 365 Group NameSingle line of text
Assigned DateDate and time
I’m submitting details from Power Apps to this SharePoint list. Refer to the example below.
How to Save Power Apps Dropdown Selected Value to SharePoint List

I took a dropdown control in Power Apps in the SharePoint list for the Office 365 Group Name field. The dropdown selected value will be stored in this SharePoint list for this group field.

To achieve this, follow the steps below!

1. Add the following controls to the Power Apps screen.

  • Text input control: For project name.
  • Dropdown control: For group name.
  • Date Picker control: For an assigned date.

2. I need to get all Microsoft 365 group names in the dropdown control. So, use the formula below for the Items property of the dropdown control.

Distinct(Office365Groups.ListGroups().value,displayName)
powerapps save dropdown value to sharepoint list

3. Add one button control to submit the data to the SharePoint list. And provide the formula below in the submit button’s OnSelect property.

Patch(
    'Projects For Office 365 Groups',
    Defaults('Projects For Office 365 Groups'),
    {
        Title: txt_projectName.Text,
        'Office 365 Group Name': drp_grpnames.Selected.Value,
        'Assigned Date': DatePicker_A.SelectedDate
    }
)

The Patch() function will submit the details to the SharePoint list. Here,

  • Projects For Office 365 Groups is the sharePoint list name.
  • Title, ‘Office 365 Group Name, and Assigned Date are the field names.
  • drp_grpnames is the dropdown name.
save dropdown value in powerapps

4. Save and publish the app. Then, preview it. As shown above, the dropdown selected value is saved in the SharePoint list.

This way, we use it if we submit details to a SharePoint list from Power Apps without Form control.

Save Power Apps Dropdown Selected Value to SharePoint List [When Dropdown within Forms]

I created a Power Apps form to submit the details of the SharePoint list I explained above. Now, in the form, we need to use dropdown control instead of text input for the Office 365 Group Name field. So, the selected value in the dropdown must be stored in the SharePoint list.

how to save dropdown selected value in sharepoint list

Follow the steps below!

1. In Power Apps, add Edit form control and connect it with the SharePoint list. The image below shows the Office 365 Group Name field in text box control.

how to save dropdown value in sharepoint list

2. Add a Dropdown control in place of the Office 365 Group Name field Data card value. Then, you’ll get some errors like the one below.

how to edit a drop down list in sharepoint

3. Provide the below formula in the Update property of the Office 365 Group Name_DataCard1.

Dropdown.Selected.Value

By using this formula, the selected value in the dropdown will be saved to the SharePoint list.

add power apps dropdown selected value in sharepoint list

4. Still, another error is present, so provide the dropdown name instead of the previous data card value. Now, use the Distinct function in the Items property of the dropdown to get the Office 365 group names.

Distinct(Office365Groups.ListGroups().value,displayName)

5. Provide the below formula in the OnSelect property of the submit button.

SubmitForm(Form1)

The SubmitForm() function will submit the details to the SharePoint list.

add power apps dropdown selected value in sharepoint list choice column

This way, we can save the selected details in the Power Apps dropdown to the SharePoint list.

I hope you understand how to save the Power Apps dropdown selected value to the SharePoint list from this article.

Follow this article while you’re trying to do the same. You may also like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…