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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Modify Existing...
Power Apps
Unanswered

How to Modify Existing Collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

Taking over Power Apps for a colleague, and noticed this particular list is pulling from a collection table:

MembersOnly_0-1652454262726.png

 

Is there any way to modify the current collection formula so I can just insert a new list? The nature of the collection needs to stay the same but I can't alter the current list due to it funneling into a different app as well. What I need to do is replicate the same collection but using a new/similar Sharepoint list that I have made.

 

Thank you!

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Are you wanting to replicate the lists that drive this App.

    Here is some PowerShell that will replicate the lists exactly just change your source

    #Config Variables
    $SiteURL = "https://specialistvalveservices.sharepoint.com/sites/OdfjellPSVRegister/"
    $ListName = "Odfjell PSV Maintenance History"
    $TemplateFile = "C:\Temp\ListSchema.xml"
     
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL
     
    #Get the List schema as Template and export to a File
    $Templates = Get-PnPSiteTemplate -OutputInstance -Handlers Lists
    $ListTemplate = $Templates.Lists | Where-Object { $_.Title -eq $ListName }
    $Templates.Lists.Clear()
    $Templates.Lists.Add($ListTemplate)
    Save-PnPSiteTemplate -InputInstance $Templates -Out $TemplateFile
    
    
    #Config Variables
    $SiteURL = "https://specialistvalveservices.sharepoint.com/sites/PSVRegisterMaster/"
    $TemplateFile = "C:\Temp\ListSchema.xml"
     
    #Connect to PnP Online
    Connect-PnPOnline -Url $SiteURL -Interactive
     
    Write-Host "Creating List from Template..."
    Invoke-PnPSiteTemplate -Path $TemplateFile

     

    Just change it to your needs,  if you are using PowerApps to save to both locations then i think you will need to Patch into the separate list after you have done the SubmitForm

    https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-patch

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks so much--however I am new to these apps and my tiny lizard brain is having trouble comprehending what you just sent. Is there anyway to literally pull up the entire formula that my colleague loaded into this collection and just insert my new list over his original?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Just change the datasource on your app if they are identical?

    The problem as described though is that your colleague list is used in multiple locations that way when you do your SubmitForm it will write to the original list.  If you need to write it to 2 locations then the econd will need to be a patch




    https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-patch

     

    For an example of a Patch Function

    Patch(
     MaxDocNumber,
     Defaults(MaxDocNumber),
     {
     Title: Label_DocNumberPrefix.Text,
     'Maximum Number': If(
     Checkbox_ShowSeqNumber.Value = true && (DataCardValue_DocumentNumberType.Selected.Value = "Isometric Drawing" || DataCardValue_DocumentNumberType.Selected.Value = "Drawing"),
     Value(DataCardValue_SeqNumber.Text),
     PrevDocNumber + Number
     ),
     'Maximum Sheet Number': If(
     (DataCardValue_DocumentNumberType.Selected.Value = "Isometric Drawing" || (DataCardValue_DocumentNumberType.Selected.Value = "Drawing" &&Checkbox_ShowSeqNumber.Value = true)),
     PrevSheetNumber + Number,
     Value(DataCardValue_SheetNumber.Text)
     ),
     'Sequence Number': If(DataCardValue_DocumentNumberType.Selected.Value = "Isometric Drawing", DataCardValue_SeqNumber.Text ,"")
     
     }
     )
     );





  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you good sir. However what I am struggling with seems to be even more rudimentary. Where am I even to enter this? How does one change the data source? What I have difficulty grasping with this program thus far is the canvas where my visual elements are taking shape is also the same workspace wherein I am entering all of these backend formulas/data sources. It appears to me that there is no linear process of executing a simple process like creating/amending a collection. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard