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 / Create a collection fr...
Power Apps
Answered

Create a collection from Sharepoint list fields

(1) ShareShare
ReportReport
Posted on by 2,297

My app is connected to a SharePoint list.

 

I want a collection to get 3 of those columns, because if I get all the columns it becomes very slow.

 

So,

 

ClearCollect( _thisColl, AddColumns( mylist.fieldA, mylist.fieldB, mylist.fieldC))

 

But this isn't working.

Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @WebPortal 

     

    In one of our replies here Collection with blank field value of Record type  we happened to do exactly that. Ironically, we felt upon further checking that it was probably not what that user wanted - however, maybe it happens to be exactly what you may want.

     

    Here is an inline summary of the reply to know which one it is:

     

    ~~~~~~

     

    OnVisible Screen 1:

     

    ClearCollect(colBook,{});
    ClearCollect(_blankCollectionMock1,{firstname:"somemockvalue"});
    Collect(
     colBook,
     {
     Title: txtInput1.Text,
     Author: Defaults(_blankCollectionMock1)
     }
    )

     

    Now this part, say from a Button OnSelect:

     

    UpdateIf(colBook,true,{Author:First(Contacts)})

     

    ...........

     

    From next post:

     

    "Upon further testing, our implementation above would only populate the firstname. If that is not what you want, you better do like this instead"...

     

    But maybe this above, is exactly what YOU want where it only has some of the columns - please check and see if something along lines of the above helps in case.

  • Verified answer
    WarrenBelz Profile Picture
    155,544 Most Valuable Professional on at

    Hi @WebPortal ,

    You need ShowColumns()

    ClearCollect( 
     _thisColl, 
     ShowColumns( 
     mylist,
     "fieldA",
     "fieldB",
     "fieldC"
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WebPortal Profile Picture
    2,297 on at

    @WarrenBelz 

    That is exactly what I was looking for, I was so sure the function was "SelectColumns" instead of "ShowColumns", so searching didn't help.

    Thank you!

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

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 387

#2
timl Profile Picture

timl 340 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 301

Last 30 days Overall leaderboard