cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sifu
Responsive Resident
Responsive Resident

Patching multiple items based on gallery, to two lists

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
});

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sifu
Responsive Resident
Responsive Resident

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
}));

View solution in original post

1 REPLY 1
Sifu
Responsive Resident
Responsive Resident

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
}));

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

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (55,798)