web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Copy a Power Apps SharePoint Integrated form from one library to another (Different library title)

(4) ShareShare
ReportReport
Posted on by 2,334 Moderator
Hi Everybody,
 
It's been several months since I posted on the community forums. For my return I decided to share with you an experience on copying a custom Power Apps form from a SharePoint library to another that has the same content type but does not have the same name.
 
I found a bunch of tutorials on how to copy a form, but all of them refer to copying to a library that has the same name in another site or environment. Maybe a tutorial already exists, but I did not find it. However I still found all my answers in different sources and I compile here the fruits of my research.

The main problem encountered concerns the data source. When you create one in Power Apps, the latter names it using the title of the library. So you have to replace the initial data source in the destination form and it becomes a nightmare when you have a complex form that contains a lot of formulas that refer to the data source.

You can of course modify this reference in each formula manually, which is what I did at first (127 formulas to modify, I might as well tell you that I felt a bit masochistic). After making all the modifications, I had a moment of solitude when I realized that there were still 6 errors linked to a reference to the old data source that I could not modify from the interface: Error in SharePointIntegration.SelectedHidden property
 
Good news, I finally succeeded! Now let's move on to how I did it, this is a long topic, be lenient if you see spelling mistakes. I tried to illustrate as much as possible. This method works for me, moreover to write the topic I redid the manipulation in order to have the screenshots.
 
Note: You will need to unzip/zip, DO NOT use the tool integrated into Windows, prefer 7zip (that's the one I use). I don't know why with the Windows one I was systematically confronted with a fairly telling error when opening the imported form: There was error opening the file.
 
Step 1 - Export source form
 
  • From library/list settings, go to "Form settings"
 
 
  • Follow "See versions and usage", you'll get in Power Apps.
 
  • Click "Export package"
 
 
  • Give a name and click "Update" link
 
  • Select "Create as new" and save
 
 
  • Finally click "Export" button, Power Apps will createing the package and ask you for a download location once done. You'll get a zip file called as you named your package with a time stamp.
 
 
Step 2 - Editing package's JSON files
 
  • First unzip archive, you'll get the following items
 
  • Navigate to last sub folder in "Microsft.PowerApps", my path is "Microsft.PowerApps\apps\83342470770660478
  • We're going to edit the first JSON file to link form with the new library/list (mine is "8334247077066760478.json"). 
Note: I use Visual Studio Code, it provides an usefull "Format document" function to get JSON in a more readable way.
 
Look for the "embeddedApp" object : 
 
 
 
We'll need to change "listId" and listUrl" properties. You can get these information in settings page of destination library/list
 
 
Note: Get rid of "%7B" and "%7D" which are respectivelly Uri encoded value of "{" and "}", we don't need them.
 
Once done, save and close file.
 
  • Now, rename the .msapp file into .zip (just add .zip at the end)
Note: To edit files in this archive, I don't unzip, I use 7Zip and edit files from 7Zip manager. I didn't test unziping and zipping back. I'll let you give a try if you prefer that way.
 
So, I open archive with 7Zip manager and get this
 
 
Navigate to "Controls" folder, there are 2 JSON files we'll need to edit
 
 
Edit both and replace any occurence of old datasource by new one using CTRL-H. In mine files old one is "Courriers 2024" and new one is "Courriers 2025" which are library's title.
 
 
 
We are done with file editing, close 7zip manager and rename back file to .msapp
 
  • We now need to zip back the package to send to Power Apps. Go back to first folder 
 
Select both file and folder, zip them, destination archive name does not matter
 
 
Step 3 - Import our new package into Power Apps
 
  • From Power Apps, Go to "Apps" section and select "Import package" from "From package (.Zip)" 
 
 
  • Upload your package
 
 
  • Once Power Apps is done with upload it brings you to import package configuration page, click "Create as new" link and give it a new name
 
 
 
 
  • We're done with the import, open Apps from resulting page 
 
 
 
Step 4 - Manage datasources
 
  • At this stage, Power Apps notifies us that form isn't connected to any data, thats what we're going to fix in this step
 
 
  • Go to data pane and remove old datasource
 
 
  • Finally, add the new datasource and all the red crosses disappear.
 
 
  • Now all you have to do is to save and publish. Once done, go to your library/list, the new custom form will be available and functional.
 
That's all folks !
 
 
 
_______________________________________________________________________________
 
If this helps you in any way, please give it a like.

 
Categories:
I have the same question (0)
  • Verified answer
    MM-18020227-0 Profile Picture
    8 on at
    Copy a Power Apps SharePoint Integrated form from one library to another (Different library title)
    Cannot thank you enough for this detailed explanation. It resolved an issue I spent hours trying to troubleshoot.
  • NiteWalker Profile Picture
    71 on at
    Copy a Power Apps SharePoint Integrated form from one library to another (Different library title)
    Hi,
     
    I just found this, and it is a great tutorial on how to copy forms. I followed the instructions, and it seemed to work. But I have one question: On the destination list, does it need to be setup first exactly like the original list? or is the import supposed to set it up? I will try this to see what happens - but please let me know.
     
    Really appreciate this article!!
     
    Thanks,
     
    Monty 
  • SamLed Profile Picture
    2,334 Moderator on at
    Copy a Power Apps SharePoint Integrated form from one library to another (Different library title)
     
    Well, my need was to duplicate an existing library by giving it a different title. It stores the scanned mails and my client wants one per year. Easy task using the "Create new library from existing one" feature in SharePoint Online. So yes, the two libraries are exactly the same in my scenario.

    I would say this could work for slightly different lists/libraries if all the fields in the data source referenced by the form exist in the destination list/library with  same internal name. This tutorial focuses on renaming data sources in JSON files. I haven't delved into whether it's possible to rename fields as well.

    However, if most but not all of the fields exist, this should work. Fields missing from the destination will still cause problems by displaying the red icon. Simply delete them if they are no longer needed or replace them manually.

    The main goal of this tutorial is to save you time by avoiding having to redo everything (design, rules, parameters, formulas, etc.). If a few differences can be corrected manually, you've saved a lot of time anyway.

    Regards ;)
  • HP-14070635-0 Profile Picture
    2 on at
    Copy a Power Apps SharePoint Integrated form from one library to another (Different library title)
    Hello @SamLed you are an ABSOLUTE LEGEND. 
     
    I spent the whole weekend trying to figure out the SharePoint.Hidden error after coping Power apps form from one list to another and then I saw your post and it helped me out. 
     
    Thanks Heaps, 
    HP
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard