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“.
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
Solved! Go to Solution.
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.
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.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
255 | |
251 | |
83 | |
40 | |
30 |
User | Count |
---|---|
302 | |
264 | |
118 | |
65 | |
47 |