cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Creat a Collection and get metadata form SharePoint

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

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User III
Super User III

HI @mssss <

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.

View solution in original post

Thank you!!

It worked🙂

View solution in original post

2 REPLIES 2
Super User III
Super User III

HI @mssss <

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.

View solution in original post

Thank you!!

It worked🙂

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (17,089)