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 / How to Patch all recor...
Power Apps
Answered

How to Patch all records within one column of Collection to a single record of a column of SharePoint list

(0) ShareShare
ReportReport
Posted on by 21

Dear All,

I am fairly new to the PowerApps. I am building an app to help users to log issues related to industrial assets which they were previously logging on a paper base checklist. In the hard form, there was a multiple choice option that I needed to put in the PowerApps application. I used the following approach:

  1. Inserted a blank gallery
  2. Add desired multiple options of choice in the gallery items by using xthis table formula.   Table({Issue:"Passing Issue"},{Issue:"Stucking Issue"},{Issue:"Gland Leakage"},{Issue:"Actuator Leakage"},{Issue:"Diaphragm Replacement"},{Issue:"Body Leakage"},{Issue:"Bonnet Flange Leakage"},{Issue:"Inspection & Overhauling"},{Issue:"Other"})
  3. Inserted a checkbox inside blank gallery 
  4. In the text property of checkbox I typed "Thisitem.issue"
  5. In the Oncheck property of checkbox ,I asked it to made a collection called"colIssue" using the function "Collect(colIssue,ThisItem)"
  6. Now for every checkbox the user will select, it will put it in the collection and on uncheck remove it from the collection

Now I want to patch all the checkboxes in that collection to a SharePoint column called "Issues"., but while doing so I am facing a problem. First of all, the function wont let me simply put collection name in the patch formula, I  have to use Last or First functions with collection name to push it to the SharePoint list column (look at the last argument of patch function in the 3rd attachment). This results in only one value (first or last) which makes sense.

Is there a way that I can patch all the selections of checkbox inside my collection to a single column of SharePoint list.

I hope I make sense and am able to convey my problem.

 

Thanks in advance  

2.png
1.png
3.png
Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Ahmad322 ,

     

    You can use Concat() to combine the contents of a column into a single string.

    Here is the test I did:

     

    Create a list with 'Title' and 'Issue' columns. The 'Issue' is the text column.

    vxiaochenmsft_0-1666928029541.png

    Create a gallery where users can create a collection by using a 'checkbox'.

    vxiaochenmsft_1-1666928046595.jpeg

    vxiaochenmsft_2-1666928052671.png

    Add a button to submit the data, set 'OnSelect' to the following formula.

    vxiaochenmsft_3-1666928065002.jpeg

    Patch(Issue,Defaults(Issue),{Title:TitleInput.Text},{Issue:Concat(colIssue,Issue,",")})

     

    After clicking the submit button, the data is in Sharepoint.

    vxiaochenmsft_4-1666928081769.png

     

    Best Regards,

    Wearsky

  • Ahmad322 Profile Picture
    21 on at

    Dear @v-xiaochen-msft thank you so much. Concat function solved everything.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard