hello all,
trying to adjust a SPO list to write into two Lists
1, Order it self, who booked for who and when, is it delivered etc..
2, the items of the order mentioned in the point 1
To ensure that i can link the items of the order to the order, i first collect the ID which i can use the for patching the items... the problem is that this happens only once and as soon i add the variable varcart and the product name (title) it notices that this variable contains multiple items and will not put it there... i suspect ForAll has to be used somehow but cant figure out how... if i remove the varcart.title it works fine...
ClearCollect(MYCollection,
Patch('IT Hardware Web Shop', Defaults('IT Hardware Web Shop'),
{
UserUPN: userUPN.Text
}));
Patch('IT Hardware Web Shop - Cart Items',Defaults('IT Hardware Web Shop - Cart Items'),
{
Title: First(MYCollection).ID,
ProductName: varcart.Title
});
Solved! Go to Solution.
could solve it:
ClearCollect(MYCollection,
Patch('IT Hardware Web Shop', Defaults('IT Hardware Web Shop'),
{
UserName: {
Claims: "i:0#.f|membership|" & (userUPN.Text),
DisplayName: userUPN.Text,
Email: userUPN.Text,
Department: "",
JobTitle: "",
Picture: "" },
UserUPN: userUPN.Text
}));
ForAll(collcart,
Patch('IT Hardware Web Shop - Cart Items',Defaults('IT Hardware Web Shop - Cart Items'),
{
Title: First(MYCollection).ID,
ProductName: Title,
ProductID: ProductID,
Quantity: Quantity
}));
could solve it:
ClearCollect(MYCollection,
Patch('IT Hardware Web Shop', Defaults('IT Hardware Web Shop'),
{
UserName: {
Claims: "i:0#.f|membership|" & (userUPN.Text),
DisplayName: userUPN.Text,
Email: userUPN.Text,
Department: "",
JobTitle: "",
Picture: "" },
UserUPN: userUPN.Text
}));
ForAll(collcart,
Patch('IT Hardware Web Shop - Cart Items',Defaults('IT Hardware Web Shop - Cart Items'),
{
Title: First(MYCollection).ID,
ProductName: Title,
ProductID: ProductID,
Quantity: Quantity
}));
User | Count |
---|---|
221 | |
99 | |
94 | |
55 | |
35 |
User | Count |
---|---|
273 | |
106 | |
105 | |
60 | |
60 |