cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Romiro
New Member

Data saved in a sharepoint list by the powerapps patch() function is empty

I have an app in powerapps used by more than 1000 people that uses lists in sharepoint as a database. Sometimes the data saved in some columns of the lists are empty even though the data is provided in the patch() function by powerapps.

 

Example: Patch(List;Defaults(List);{ 'User Name': varUser.Name; 'Cost Center': varUser.CC })

 

Sometimes user name is empty and cost center is not, other times it is the other way around. then I check if varUser.Name and varUser.CC have data for the user saved at that moment and there is. to make sure I do another patch() with the same user and it works normally, the data is saved in full, but in the previous case one of the data was blank. this problem occurs for data coming from variables and controls (text box, comboBox, ...).

 

do you know why this happens? do you know the cause?

4 REPLIES 4
Eelman
Super User
Super User

@Romiro 

It's a little hard to tell what's happening from the info you've given here but you could try a few things.

 

- check the Created date/time of the data going to your list to see if certain times receive higher than normal traffic

- check, if possible, the device types that are fail eg iOS, android, web app, etc

 

You could also think about setting up a system to stop users trying to Patch empty data. Eg

 

If either one of the above variables are empty,

- set the display mode of your submit button/icon to Disabled

- give these users a Refresh icon they can click which will re-capture the variable data

- if the data is re-captured, set button/icon display mode to Edit 

- if the variable data isn't re-captured, offer users an option to submit a feedback ticket that is sent to you

 

Some type of system like the above may help you identify what's happening?

v-jefferni
Community Support
Community Support

Hi @Romiro ,

 

Could you please share how you create the variable varUser? Since the Name and CC columns of your formula cannot give me any hints.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thanks for the answer @Eelman , my app already has all the validations for users not to type empty, ie varUser is mandatory.

 

My problem happens when I save the data, to be more specific it happens when Patch() sends the data to Sharepoint that for some reason, in certain cases, some columns are empty in the Sharepoint list. but I think the problem is traffic.

 

Thanks for the answer @v-jefferni

 

the variable varUser is defined when the user searches for a name in a TextBox and it is suggested to him in a Gallery the possible options to select, when he clicks on one of the records of the Gallery varUser is defined with the selected record.

 

after filling in other data, the user clicks on save and then saves the data to a Sharepoint list using Patch().

 

and sometimes, a column of the Sharepint list is empty after saving the data (problem described in the first post). it happens little, like 10 out of every 1000 records saved, but it happens and I still haven't found the cause.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,583)