I want to implement a scenario where i have multiple SharePoint sites with Same Schema. (count is more than 50 sites)
I have a list "Products" on every SharePoint Site (Same schema again).
I have created a power app to enter data in this list on one of the site.
Wanted to know that if i provide power app URL on a page with query string parameter as my current site URL, it is possible to change form/gallery data source/list pointing to that site only.
so that when user is going to site A then should be able to enter data in products list of site A.
and when user is going to site B then should be able to enter data in products list of site B.
Note: I am planning to pass Site URL in query string parameter.
Is it feasible?
Awaiting to get inputs on this.
No, you cannot do this in PowerApps as you describe. It expects to have its datasources defined in the app. So you would either need 50 version of the app, or simply have all 50 site Product lists as datasources in your app.
However, this goes beyond just having them in the app. You cannot switch out the datasource of controls like galleries or editforms easily.
For EditForms, you would need to essentially have 50 edit forms that would be visible or not based on which list you are working with.
For Galleries, you can use a Switch function to determine which datasource you are getting data from, but be careful as the schemas need to match, or you need to extrapolate a common set of columns for each in your Items formula.
So...the short answer is, Yes, you can use the methods above to do it. There will just be some repetition and you will also want to make sure that users of the app have access to all of the lists. Even though they might not be interacting with other lists (based on the site info passed in), the app will still want to connect to them and if there is no access, then they will see a slew of error notifications....not so nice.
I hope this is helpful for you.
Thanks for your detailed response on this with clarification.
Limitation with my requirement is that sites count can keep on increasing once a user provisioned a site.
Also, users will be unique across different sites.
Looks like this is not feasible in my case.
Thanks again for the help.
Not easily achievable in that situation.
Not knowing the amount of data you have on each site, the only other I can imagine would be to centralize the data to a central list that contains the data from each site. This is something that PowerAutomate could assist with in duplicating records and changes between all the locations. Then in your app, simply filter the central list by a column in your central list that would contain the site name.
Not all that great, but it would be pretty flexible at least.
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.
The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.
We are excited to announce a new way to share your ideas for Power Apps!