I have developed a form canvas app with a list as a data source. While testing this I created the list in My lists. Now that testing is done and the app is complete I have cloned this list from the dev site to the sharepoint site this app is for. However now I need to change the data source to this clone and I cannot find a way to do this that doesn't replace all of the datacards in the form. If I replace all of the datacards I have to pretty much redo most of the app because of the positioning and formatting changes (eg. fields with radio buttons change to dropdown lists). If I don't replace the datacards and delete the old data source they then disappear as well. The new data source (list) is literally identical to the old one so I'm not sure why the change is resetting everything.
Is there a way to change the data source without needing to rebuild the app?
@AlanMcK This is a much better and easier way to replace a data source (when the new data source and the underlying elements have the same name).
I actually deleted the old Datasource before adding the new, duplicate data source and it all just worked ... no need to click on the red Xs.
(I also populated my duplicate list using a Flow, as in this example: https://techcommunity.microsoft.com/t5/sharepoint/copy-sharepoint-list-to-the-another-new-site/m-p/1843245)
hi, i have tried as per the solution, however there is still error in my )
Ok I have worked it out, I was just getting the steps wrong, here it is:
HI @Power_Automater,
I am sorry that there is no other more efficient way to achieve your need.
That looks like a great way to build going forward @v-qiaqi-msft , but it doesn't appear to present any immediate way to do what I need. Wouldn't I have to completely rebuild everything from inside a solution first? If so that is even more work than rebuilding just the form.
Hi @Power_Automater,
You could try the environment variables, ideally you'd only have to change the value of the environment variable in the solution to switch from one data source to another.
You do have to make sure that the structure of both data sources is the same though.
Here is a detailed tutorial:
Solutions in Power Platform | ALM, Power Apps, flows & Environments - YouTube
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional