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 / Creat a Collection and...
Power Apps
Answered

Creat a Collection and get metadata form SharePoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

I am having trouble on collection.

 

1.I have created a Collection “_my_catalog” created from sharepoint document library.

I am using metadata(Tag) on my share point.

2. I have one more  Collection “_my_cart “. This is created from gallery “_my_catalog” with

Collect(_my_cart,ThisItem)

3. I would like to create a collection from “_my_cart “ with qty.

Following worked but I could not take my metadata “document_term.Label“.

mssss_0-1610857903608.png

ClearCollect(

    _order_sum,

AddColumns(

GroupBy(_my_cart,"ID","{FilenameWithExtension}","GroupedItems"),

        "qty",CountRows(GroupedItems)

          )

);

Following Did not work.

ClearCollect(

    _order_sum,

AddColumns(

GroupBy(_my_cart,"ID"," document_term.Label","{FilenameWithExtension}","GroupedItems"),

        "qty",CountRows(GroupedItems)

        )

);

I have changed " document_term.Label" to

"{document_term.Label}"

"'{document_term.Label}'"

"document_term"

"{document_term}"

"'{document_term}'"

but did not work.

 

I would like my final collection to be like following 3 column.

FilenameWithExtension | qty | document_term

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,926 Most Valuable Professional on at

    HI @Anonymous <

    Using your the names you supplied (I assume they are valid), you might need something like this

    ClearCollect(
     _order_sum,
     AddColumns(
     GroupBy(
     AddColumns(
     _my_cart,
     "DocumentTerm"
     document_term.Label
     ),
     "{FilenameWithExtension}",
     "DocumentTerm",
     "GroupedItems"
     ),
     "qty",
     CountRows(GroupedItems)
     )
    )

    Apart from the syntax here, it you are grouping by FileNameWithExtension (and you do not need ID), you are only ever going to have one item in the group, so your count with always be 1.

     

    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.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you!!

    It worked🙂

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard