Hi everybody! I've just imported the Excel file I was using as a source for my app to a SQL database.
Well, the issue is that now it seems like I should rename ALL my table references adding "[dbo]." in front of them!
For instance: rename "Search(Customers,..." to "Search([dbo].[Customers],...."!
It is a nightmare, of course. I should go and open EACH and EVERY property in all my forms, and search & replace these occurrences...
Is there any workaround/smart way to do it?
Could you please share a bit more about your scenario?
Do you want to get rid of [dbo] within your app?
The [dbo] is the default schema in SQL Server, if you want to get rid of [dbo] within your app, I afraid that there is no way to achieve your needs in PowerApps currently.
As an alternative solution, you could consider take a try to save all records of your SQL table into a Collection using ClearCollect function (the collection would has same data structure with your SQL table), then within your app, use the Collection as a data source instead of the SQL table.
I have made a test on my side, please take a try with the following workaround:
Set the OnVisbile/OnStart property of the first screen of your app to following formula:
On your side, please type the following formula:
Then within your app, you just need to type the following formula to reference the SQL table (without opening EACH and EVERY property in all your forms, and search & replace reference😞
Search(Customers,..,..) /* Use the collection as data source instead of the SQL table*/
In addition, if you made some modification to the collection, you also need to update the collection back to your SQL table data source using Patch function.
More details about the Patch function and ClearCollect function in PowerApps, please check the following article:
Thanks @v-xida-msft Kris for your answer!
> Could you please share a bit more about your scenario?
> Do you want to get rid of [dbo] within your app?
After moving all my Excel tables to SQL, I noticed that I must rename ALL my table references, adding "[dbo]." in front of them.
For instance: now in my app I have...
Well, wth the Customers table in SQL I should rename it to...
and I should change my code like this for ALL my references to the "Customer" table, in all properties... it would be a nightmare!
I was looking for a quick solution to this issue, if possible.
With your solution I would avoid renaming all occurrences of my Excel table, good!
1) I am moving my data source from Excel to SQL because I want to get rid of the 500 record limit of Excel (ok, now we can experimentally increase it to 2000, but it is just another limit that I prefer to avoid).
Loading all my tables to several collections in memory would avoid this limit?
2) Loading ALL tables in memory onstart would not increase A LOT the loading time of the application?
3) What about the possible OUT OF MEMORY issue?
Thanks again Kris for your help!