cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WebPortal
Post Prodigy
Post Prodigy

Create a collection from Sharepoint list fields

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.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

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.

View solution in original post

3 REPLIES 3
poweractivate
Community Champion
Community Champion

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

WarrenBelz
Super User
Super User

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.

View solution in original post

WebPortal
Post Prodigy
Post Prodigy

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,309)