cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Inserting data from Text input in Gallery to Sharepoint List

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
Highlighted
Community Support
Community Support

Re: Inserting data from Text input in Gallery to Sharepoint List

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

Highlighted
Frequent Visitor

Re: Inserting data from Text input in Gallery to Sharepoint List

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,746)