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

Refreshing SQL Server Schema in PowerApps

Hi There,

 

I see another similar post to this; however it never really went into much detail.  If I make changes to my Views or Tables in an Azure SQL Server, those changes don't seem to be reflected in PowerApps.  For example, if I add a new field or change a field name on the SQL Server side, those fields won't show up in PowerApps unless I close out and re-open.

 

What is the best way to go about updating the SCHEMA in Powerapps when I make changes to the SQL Server View or Table.  I continually make changes to the SQL Server side and it would be convenient if there was a fast way to update this.

 

Thanks,

Chad

17 REPLIES 17
Dawidvh
Level 10

Re: Refreshing SQL Server Schema in PowerApps

Hi @Chad1,

 

I usually accomplish this by refreshing the datasource under the datasource panel. Let me know if you don't come right.

 

2019-02-05_09-59-07.pngRefresh SQL in PowerApps

 

twitter: @dawidvh

youTube: https://www.youtube.com/channel/UCIMe_ErQZP5chbI9UyW0xLw

>>If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.<<

KLatch
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

I have also always used the method @Dawidvh mentioned, however that seems to no longer be working for me. After renaming a column in a view and refreshing the datasource, I am still facing the same error:

"The requested operation is invalid. Server Response: Invalid column name....."

 

Restarting the browser did nothing. Just to see, I created an entirely new app, added the datasource in question, and the error persisted even there.

 

Is anyone else having this problem?

Chad1
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

Hi David,

 

I tried adding a new field in a SQL Server View and refreshing the panel as you mentioned, but it still didn't show up when I typed in ThisItem.fieldname.  I thought maybe it was just the autofill option not working so I typed in the fieldname and tried to run it and no data appeared.

 

Further, in another instance I added a whole new SQL Server View, and that new View didn't appear as well in the Datasource list, and because it doesn't show up I can't refresh it.

 

The only thing that seems to work is to close the editing window, go back to the web.powerapps.com window, and then re-open the app in edit mode.

 

Thanks,

Chad

kashan_khan
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

Chad is right, any minor change we have to fix our connection first, always take me a little to figure out the connection and if I dont fix the connection than I get this error on the start up of App. Last time I worked it took me few hours before I got to know whats going on

 

Connection Error - PowerApps SQL

aprilhazel
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

Same issue here

Highlighted
Wauters
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

Anyone was able to find a resolution? We are having the same issue. Refreshing the data source doesn't seem to work.

aprilhazel
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

@WautersNo update here. Basically, you just have to cross your fingers and wait several hours till it fixes itself.

Chad1
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

I've since found that you basically need to remove the Data Source to that table or view and re-add it to have changes reflected. However, the Data Connection to the database doesn't need to be changed.
Wauters
Level: Powered On

Re: Refreshing SQL Server Schema in PowerApps

Thanks for sharing that Chad. In our case, we are using an on-premise data gateway and re-adding the data source wasn't sufficient. Restarting the data gateway helped in this case. But this process remains cumbersome.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,229)