cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vaishnav
Frequent Visitor

Inserting data from Text input in Gallery to Sharepoint List

Hi Developers,

 

I would be really thankful if you could please help me with with this following issue. It is fine in case you have not encountered this before.

 

I am willing to insert the "Qty" for every commodity (please see snapshot) from every gallery into a Sharepoint list (please see snapshot). Basically the quantities would be different for all and would be needed to insert into the Sharepoint list bt LookUp.

 

The problem which I am facing is - My Patch command is not working, also I tried LookUp but that is giving out error.

Have you come across similar situations before,, kindly provide your suggestions on this.

Thank you.

 

Vaishnav

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi  @Vaishnav ,


To understand your issue better:
1. Do you want to use a Save button to patch each Qty for commodity to SP list?
2. Do all data sources of galleries shown in the second snapshot come from the one SP list?

3. How is QTy entered into gallery? By Textinput box?

4. Item is the unique column, right?

 

ForAll function is suitable for this scenario, I think.

You should first create a new text column named Qty in SP list, then collect item(column name) and Qty(entered) of each gallery to collection, and aggregate all collections into one,  finally use forall function to patch each Qty to SP list.

please try to put the following formulas to Save button's OnSelect property, and check if your issue is fixed.

 

Concurrent(
ForAll(Gallery1.AllItems,Collect(A1,{ColumnItem:Item,ColumnQty:TextInput1.Text})),
ForAll(Gallery2.AllItems,Collect(A2,{ColumnItem:Item,ColumnQty:TextInput1.Text})),
...) /* Every galleries need it */
ClearCollect(ColTotal,A1,A2,..) /* put all galleries together */
ForAll(ColTotal,Patch(Inventory,LookUp(Inventory,Item =ColumnItem),{Qty:ColumnQty}))

Please let me know If this doesn't work.

Best regards,

Sik

 

View solution in original post

2 REPLIES 2
v-siky-msft
Community Support
Community Support

Hi  @Vaishnav ,


To understand your issue better:
1. Do you want to use a Save button to patch each Qty for commodity to SP list?
2. Do all data sources of galleries shown in the second snapshot come from the one SP list?

3. How is QTy entered into gallery? By Textinput box?

4. Item is the unique column, right?

 

ForAll function is suitable for this scenario, I think.

You should first create a new text column named Qty in SP list, then collect item(column name) and Qty(entered) of each gallery to collection, and aggregate all collections into one,  finally use forall function to patch each Qty to SP list.

please try to put the following formulas to Save button's OnSelect property, and check if your issue is fixed.

 

Concurrent(
ForAll(Gallery1.AllItems,Collect(A1,{ColumnItem:Item,ColumnQty:TextInput1.Text})),
ForAll(Gallery2.AllItems,Collect(A2,{ColumnItem:Item,ColumnQty:TextInput1.Text})),
...) /* Every galleries need it */
ClearCollect(ColTotal,A1,A2,..) /* put all galleries together */
ForAll(ColTotal,Patch(Inventory,LookUp(Inventory,Item =ColumnItem),{Qty:ColumnQty}))

Please let me know If this doesn't work.

Best regards,

Sik

 

View solution in original post

Hi @v-siky-msft ,

 

Thank you for your valuable suggestion. I am glad to get this solved with your help, you absolutely got that right.

Below is the code which I have used:

 

 

Concurrent(
ForAll(Boots_Glry.AllItems,Collect(A1,{ColumnItem:Label1.Text,ColumnQty:TextInput1.Text})),
ForAll(BF_Glry_1.AllItems,Collect(A2,{ColumnItem:Label1_1.Text,ColumnQty:TextInput1_1.Text})));
ClearCollect(ColTotal, A1, A2);
ForAll(ColTotal,Patch(Inventory,LookUp(Inventory,Item=ColumnItem),{Qty:ColumnQty}));

 

Thank you.

 

Best Regards,

Vaishnav

 

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 (46,154)