Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error on Gallery connected with SQL Server database

Cannot read property 'updateData' of undefined

Randomnly get this error on my gallery, which is connected with the table of SQL Server database.

Gallery is being filtered based on selections from comboboxes.

Usually get this error, when all comboboxes are cleared and gallery shows whole table.

Community Support
Community Support

Could you please share the items property of the Gallery?

Besides, what is the "updateData" mentioned in the error message?


For the Items property of the Gallery control, we could write the formula in the format below:



  filter([dbo].[TableName], expression)


Let me know if the format above works.





Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advocate IV
Advocate IV

I am also now getting this error - "cannot read property 'updatedata' of undefined". 


It is intermittent.  Basically, a single field is being updated in a SQL table using Patch and the gallery is refreshed.  I can perform action 10 times without seeing error, then, bingo.  App is in release 3.18082.42.

pulsebeat, did you ever find a resolution to this? I'm encountering the exact same issue...very frustrating.



Sorry, but don't remember as it is about a year ago.  My guess is that it just went away.  If I found a solution I would have posted it.  But I will think on it for a while and see if something comes to mind.  

Advocate I
Advocate I

Just got this error as well. Also using Azure SQL. I don't have any galleries linked to unfiltered tables, however.

@EdwardAhn , are you having trouble with a Patch function? My issue was related to trying to patch values from a form, but I was submitting the form and then patching in the "On Success" property.  Problem was at that point, the form had already been submitted and cleared so the value was gone.  

My fix was to write the fields I needed to patch to variables in the "Submit" button control before I submitted the form.  Then use the variables in the Patch function instead of having the Patch function refer directly to the form (or maybe gallery in your case?)  Hope that helps. 

I'm hitting this issue as well. 

I have an Azure SQL data source. Some code is performing a number of patches (which appear to succeed) and then doing a refresh of several datasources.

Intermittently, this message will briefly appear, the App will seem to close and reopen (screen goes blank, spinning loading wheel appears for a few seconds then the first App screen reappears), after which some fonts change (?!?) and some drop downs no longer populate. A Ctrl+F5 restarts the App properly.

It seems that in most/all cases the data has been written.

Thought the issue may relate to over-taxing the SQL DB but we tried going from S0 to S1 without any change.

Improving query efficiency (making queries faster, returning less data) has improved but no eliminated the issue.

Helper I
Helper I

Based on the replies in this thread, this seems to be a generic error because I'm getting it with SharePoint.


Some notes:

I'm getting the runtime error "Cannot read property 'updateData' of undefined" when first launching the studio after the app loads.  It points to the location of the home screen:  Home .OnVisible


That OnVis has a lot going on, code below.  If I simply switch to another screen and back to Home, the OnVis runs again and the error goes away.  I'm probably doing something dumb that affects the timing when the app loads...but if not, oh well, seems to be a non-issue:


UpdateContext({locOverlayLoading:true}); //show loading.....
UpdateContext({locOverlayLoadingText:"Loading user settings...."}); //show this text
//global vars:
Set(gblUserEmail, User().Email);
Set(gblSelectedDate, DatePicker.SelectedDate);
Set(gblSelectedDateNumeric, //this is needed bc sp currently doesn't support delegation for date object filtering
//load user settings:
ClearCollect(colUserSettings, LookUp(SafetyReportingv2UserSettings, UserEmail=gblUserEmail));

//add global var with value from user settings sp list UserSelectedProject.Value:
Set(gblProjectName, LookUp(colUserSettings, UserEmail=gblUserEmail, UserSelectedProject.Value));

UpdateContext({locOverlayLoadingText:"Loading existing records...."}); //show this text

//if project not found, change project sel group visibility.  if project found, build partner/subcontractor weekly batch template
    UpdateContext({locProjSelMenuVis:true}), //if true, show project selection menu
    ClearCollect(colBatchTemplate,   //if false, gather project matrix data
        ShowColumns(Filter('Safety Project Data Matrix v2',ProjectName.Value=gblProjectName),"PartnerName","SubcontractorName","ProjectName");

//reset dropdown control

//create-update collection of existing records, without delegation warning
        'Safety Reporting v2',
        WeekEndingNumeric = gblSelectedDateNumeric
        Project.Value = gblProjectName

UpdateContext({locOverlayLoading:false}); //hide loading.....
UpdateContext({locOverlayLoadingText:""}); //hide text



Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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