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

Notifications

Announcements

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard