cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deviecb
Level: Powered On

Issue - Inconsistent Updating SharePoint Datasource using ForAll

I have a gallery that is set up more like a table.  A number of the fields are set up as view only labels, but I have two fields set up as text boxes that pull up the current value of the record and allow the user to change it.  I then have a save button with the following code (the datasource is a SharePoint List and I used ID as my unique value):

 

ForAll(ForecastGallery.AllItems,Patch('datasource1', {ID:Value(GalID.Text)}, {Forecast1:txtBox1.Text,Forecast2:txtBox2.Text}))

 

It works great for all of the records being updated, but seems to always leave the last record out the first time.  So, if I have 15 records in my gallery and i update the text boxes 1 thru 30 - the app will save 1 thru 28 in the first 14 rows, but leave the last record blank.  However, If I change the record again and save it, it updates the last record just fine.  

 

I am a bit new to this, so I sure could use the guidance.  Thanks for the help!!!

3 REPLIES 3
Community Support Team
Community Support Team

Re: Issue - Inconsistent Updating SharePoint Datasource using ForAll

Hi @deviecb ,

 

Is GalID the name of a text box control? What is the value set in the GalID control? 

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
deviecb
Level: Powered On

Re: Issue - Inconsistent Updating SharePoint Datasource using ForAll

Yes, GalID is a label control that is set equal to the value of the ID of the SharePoint list record for that row.
deviecb
Level: Powered On

Re: Issue - Inconsistent Updating SharePoint Datasource using ForAll

I did a little more testing and found that the data is actually writing correctly to the SharePoint list.  However, when the gallery item updates, it reverts back to the value that was there before or blank (again, only for the bottom record - all other items display correctly.

 

I tried to add a refresh(datasource) command after, but that didn't resolve the issue.  Still shows the wrong value for that item until i go out and reexecute the search for that recordset

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,777)