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 filter and coll...
Power Apps
Unanswered

How to filter and collect specific columns only from Sharepoint list to an existing Collection

(0) ShareShare
ReportReport
Posted on by 70

I need to filter a Sharepoint list by an ID and then collect those items with the same ID to an existing collection. I also want to only collect specific columns since not all of the columns in the list is part of the Collection's columns.

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @raizanicolem ,

     

    Please try:

     

    Collect(CollectionName,ShowColumns(Filter(Bof2,ID in [1,2,3,4]),"Column1","Column2","Column3"))

     

    Best Regards,
    Bof

  • raizanicolem Profile Picture
    70 on at

    Hello @v-bofeng-msft ,

    Thank you for answering.

    I tried doing your solution,

    Collect(existingCollName, ShowColumns(Filter('SP List','ID No.' = _itemSelected.'ID No.'), "Col1","Col2","Col3", "Col4", "Col5")));

    But I got this error, "The collect cant contain values of this type."

     

    This is what I did if I only have to get 1 item with the selected ID, but I don't really know how to collect the other items.

     

    Collect(
     existingColName,
     {
     Col1: _itemSelected.Col1,
     Col2: _itemSelected.Col2,
     Col3: {Value: _itemSelected.Col3},
     Col4: _itemSelected.Col4,,
     Col5: {Value: Int(_itemSelected.Col5)}
     }
     )

     

     

     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard