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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps Sharepoint.I...
Power Apps
Suggested Answer

Powerapps Sharepoint.Integration Launch different forms OnNew and OnEdit

(1) ShareShare
ReportReport
Posted on by 37
So I have a PowerApps form and I am using the functionality on SharepointIntegration>OnNew to launch the form using the following code
Launch("https://apps.powerapps.com/play/<AppID>",{skipAppMetadata: "true", hidenavbar: "true"},
LaunchTarget.New);
 
RequestHide();
 
This is working fine but my issue on the Form I have 2 screens, Screen 1 Launches fine as this is onNew and works ok.  Now I have a 2nd
screen on the form that is used for when they want to edit an item from the SP list.  But how do i differentiate in the code to launch
the edit form OnEdit
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,488 Super User 2025 Season 2 on at
    Hi,
     
    Add another parameter like this
     
    {skipAppMetadata: "true", hidenavbar: "true", ScreenToNavigateTo: "NameOfScreen"}
     
    Change the NameOfScreen to the Edit or the New screen depending on what you want the app to do
     
    Turn on the setting Use Navigate in App.OnStart (in the settings)
    OR
    Use a Home Screen
     
    If you use the App.OnStart do this
     
    Switch(Param(ScreenToNavigateTo),
        "ScreenNew",
          Navigate(YourNewScreenName),
        "ScreenEdit",
          Navigate(YourEditScreen),
         Navigate(SetADefaultFormNameHere)
    );
     
    Or use a Home Screen and use the OnVisible of the Home Screen
    Switch(Param(ScreenToNavigateTo),
        "ScreenNew",
          Navigate(YourNewScreenName),
        "ScreenEdit",
          Navigate(YourEditScreen),
         Navigate(SetADefaultFormNameHere)
    );
     
    Either way thats how you do it.
     
  • Gskinner76 Profile Picture
    37 on at
     
    So I tried what you suggested and on SharepointIntegration I have 
     
    OnNew = 
    Launch("https://apps.powerapps.com/play/<AppID",{skipAppMetadata: "true", ScreenToNavigateTo: "NewIncidentTicket", hidenavbar: "true"},
    LaunchTarget.New);
    RequestHide();
     
    OnEdit = 
    Launch("https://apps.powerapps.com/play/<AppID>",{skipAppMetadata: "true", hidenavbar: "true", ScreenToNavigateTo: "NewIncidentTicket_EditView", ItemID:SharePointIntegration.SelectedListItemID},
    LaunchTarget.New);
     
    Then on App StartScreen I have put the code but i get an error see screen shot below
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard