web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Post data from a multi...
Power Apps
Answered

Post data from a multi-select drop-down to a SharePoint list

(0) ShareShare
ReportReport
Posted on by 932

I am gathering data into a SharePoint list.

Some options are multi-select drop-downs.

The form I am using is necessarily split between 25 pages. 

This is a door-to-door COVID survey, and I want to ensure that no data is lost, so I am saving all data to both the collection and to a local file.

I need to do three things with the data:

On navigating away from every page of the survey that has questions,

1. Save that page's data to a collection, and ...

2. Save the data to a local file.

2. On pressing the Upload button at the end of the survey, all data is to be posted to the SharePoint list. Because some surveys might have been done offline, there may be more than one record to upload. All records saved to the local the file are uploaded to the SharePoint list; as you have intuited, this app will need to run offline, thus the use of the local file, ... or that's what I learned yesterday, anyway.

My question is, what is the correct syntax for saving this data, page by page, to the collection? 

In the spirit of helping the community, I will add what I have learned, so far:

Checkbox values need to have single quotes areound the column name:

'columnName': 'checkBoxCardName'.Value    

Single-select drop-down value:

ColumnName: DataCardName.Selected.Value

LanguageIssue: DataCardValue58.Selected.Value

And that's about it for what I have had success with; when it comes to text and multi select data entries, I have not been able to find the solution I need.

 

The question:

How to I correctly save data from a question in a form that has been split to two of more pages to both the local collection and the local file?
Her is what I have:
Collect(colCovidTeamSavedItems,{'PreviousCOVIDIsolateSafely': DataCardValue104.Selected.Value });
SaveData(colCovidTeamSavedItems, "CovidTeamSavedItems")

And, if that looks right, here is the code that is not working for my "Single line of text" fields:
StreetAddress: DataCardValue48.Text  

Also, this does not work:

StreetAddress: {Value: DataCardValue48.Text} 

Neither of the above formulas are flagged  by Power Apps, but their functionality is wanting.

 

Categories:
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @BenDonahue ,

     

    Do you want to know how to save the data, page by page, to the only one record in Collection?

    My idea is to append the data of the current Form page to the same record each time before navigating away the page. For instance.

    In the OnHidden property of the first page, use the following formula to create a new record in the collection and save it locally.

     

    Collect(colCovidTeamSavedItems,{'PreviousCOVIDIsolateSafely': DataCardValue104.Selected.Value });
    SaveData(colCovidTeamSavedItems, "CovidTeamSavedItems")

     

    In the OnVisible property of the second page, use the following formula to load the local file into the collection for offline functionality.

     

    ClearCollect(colCovidTeamSavedItems,LoadData("CovidTeamSavedItems"))

     

    In the OnHidden property of the second page, use the following formula to save the Form data to the same record as the first form, which can be looked up by GUID such as Identify ID.

     

    Patch(colCovidTeamSavedItems,LookUp(colCovidTeamSavedItems,'Identify ID'= IdentifyDataCardValue.Text),{'Column Name': DataCardValue.Selected.Value });
    SaveData(colCovidTeamSavedItems, "CovidTeamSavedItems")

     

     

    With regard to your next question, are you asking the DataCardValue48.Text can be saved to the collection or the collection data can't be saved to SharePoint list? Please elaborate on it.

    Best Regards,

    Sik

  • BenDonahue Profile Picture
    932 on at

    I figured out my issue with the StreetAddress; it was something really dumb, ilike forgetting the .Text.

    As for the other solution you provided, I think it is genius. I have one question, though; where does this value come from, 

    'Identify ID'= IdentifyDataCardValue.Text

    ?

    And finally, if a dropdown is multi-select, how do I reference those values for later use?

     

    Thank you!

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @BenDonahue ,

     

    IdentifyID is the field that stores the unique identifier of the record which should have been saved into the last record of collection in the first page, so I think we can use Last(colCovidTeamSavedItems) to retrieve that record that need to patch.

     

     OnHidden property of the second page:

    Patch(colCovidTeamSavedItems,Last(colCovidTeamSavedItems),{'Column Name': DataCardValue.Selected.Value });
    SaveData(colCovidTeamSavedItems, "CovidTeamSavedItems")

     

    With regard to the last problem, what is the date type of dropdown field? If it's a Choices column with multiple selections and the items of combo box is Choices('SP list'.'ChoicesColumn'), please try to save the ComboboName.SelectedItems to Collection field as follow, and then you can patch the field to sharepoint directly.

     

    Patch(colCovidTeamSavedItems,Last(colCovidTeamSavedItems),{'ChoiceColumn': ComboboName.SelectedItems });

     

    Hope this helps.

    Sik

  • BenDonahue Profile Picture
    932 on at

    That is a great approach, and I am doing that ad a part of the commands in the "Next" button, but OnVisible and OnHidden makes for a better place to do these kinds of things.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard