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

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
WarrenBelz
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
WarrenBelz
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (56,048)