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 / Collect (SPList, ThisI...
Power Apps
Unanswered

Collect (SPList, ThisItem) not working

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All

I have 2 SharePoint lists and I need to be able to copy items from one to another (List1, List2, both lists has same columns)

So I create collection List1C, add Gallery with items:List1C, add button to Gallery items and add to button OnSelect 

    Collect(List2,ThisItem)
But its not doing anything (not adding item to SharePoint List2) and not giving any errors. I tried re adding SP Lists, recreating - no luck 😞 

Any idea?

Thanks 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at
    @Anonymous
    Perhaps you can try changing this code:
    Collect(List2,ThisItem)

    Into this code instead.
    Collect(List2,Gallery1.Selected)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just tried it - still not doing it 🙄

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Getting "Specified column 'Button12' doesnt exist" .  Button12 - is a button to add item to SP List.

    I may try removing that button from Gallery.Selected or something like it, but I need all the data from that item to be added to SP List, not only shown in Gallery. 

  • mdevaney Profile Picture
    29,991 Moderator on at
    Deleted
  • mdevaney Profile Picture
    29,991 Moderator on at
    May I please have a screenshot of your app for context?
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi, I tried to replicate your scenario. I have 2 collections C1 and C2. They both have 2 columns Name and Desc. I have a gallery of C1 with an OnSelect property set to Collect(C2, ThisItem) and I have another gallery of C2. The C2 gallery initially is blank but once I click on any one row from C1 gallery (Name2 in my example), that row gets added to C2 and displays in the C2 gallery as well. Please let me know how your example is diff from this. 

     

    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Problem is that Collect(SPList2,ThisItem) does not add new item into SharePoint list SPList2.

    If I create a collection from SharePoint list
        ClearCollect(Col1, SPList1);      ClearCollect(Col2, SPList2);
    and add item into Col2 from Col1 (Collect(Col2,ThisItem) )- it works, but I need to add an item into SharePoint list, so 
      Collect(SPList2, ThisItem)  on selecting item in Gallery with Col1 or SPList1 not adding item into SPList2 and not showing any errors  

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just used Monitor toll (Advanced Tools > Open Monitor) and found that Collect(SPList,ThisItem) is using "operation">"getRows"

     


    , where if I create a record
        UpdateContext({record1:{Coumn1:"Val1"}}) 
    and then use it to add item to SP List
       Collect(SPList, record1)
    it works, and opration is "createRow"
       createRow.PNG

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard