cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RameshMukka
Continued Contributor
Continued Contributor

Launch PowerApps from SharePoint List "New" Button

I am very much new to PowerApps. Please help me with this small issue. My PowerApps form have data connection to my SharePoint Online list. I would like to launch this PowerApp directly from SharePoint Online list when user tries to create a list item by clicking on "New" button on default SharePoint list page. How can I achieve this? Thanks a lot in advance.

6 REPLIES 6
mdevaney
Super User
Super User

@RameshMukka 
You can launch a Customized SharePoint List by clicking the New button after you've created.

 

Customize A SharePoint List:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/customize-list-form

 

You CANNOT open a PowerApps Canvas App by clicked the new button in SharePoint.  Period.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

 

 

capoaus75
Frequent Visitor

@RameshMukka @mdevaney 
This is an old post, but it may help other people.
You CAN open a Power App by clicking the new button in a SharePoint list, by setting the Customised SharePoint List form to open your Power App.

Go to your list, Expand the dropdown Power Apps >> and click on Customize forms
Power Apps will open. 
In the Tree view you will see SharePointIntegration and FormScreen1.

Delete all the Data cards under FormScreen1.
Select the SharePointIntegration and choose the property OnNew and enter:

NewForm(SharePointForm1);
Launch("https://apps.powerapps.com/play/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX?tenantId=XXXXXXXX-XXXX-XXXX-XXXX-XX...");
RequestHide()

The launch URL you get it's the WebLink of the Power App you would like to run + the parameter &hidenavbar=true

The WebLink you can find it in your App Details.

You can also pass additional parameter for example &ID=0 and in your Power App App>>OnStart you can handle the paramenter. For example: If(Param("ID")=0,NewForm(FORMNAME)).

When all done click Save your App and Publish to SharePoint

When you click on the new button in your list your Power App should launch.

Hi @capoaus75 just wanted to thank you for this - I'd found April Dunnam's earlier posts on how to redirect a SharePoint List New Item to a Canvas PowerApp but with her URL having been from a couple of years ago the formats had been changed by Microsoft - with your URL guidance (excluding the NewForm(SharePointForm1); actually) I was able to make my NewItem redirect to my on-premise app thanks SO much ...  

This was really handy, thank you for sharing.

abruno
New Member

@capoaus75  This was great, thank you! What about opening an item directly from the SharePoint list in Edit mode? I'm struggling to get that piece to work. 

capoaus75
Frequent Visitor

Hi @abruno 

That should not be too difficult.

In your list  format one of the column to link to your canvas app and pass the ID of your item.
capoaus75_0-1626739611029.png

Enter the following JSON and update the XXXX values with the relevant data

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "a",
"txtContent": "@currentField",
"attributes": {
"target": "_blank",
"href": "='https://apps.powerapps.com/play/XXXXXXX-XXXXX-XXXXX-XXXX-XXXXXXXX?tenantId=XXXXXXX-xxxxx-XXXXX-XXXX-XXXXXX&ID='+[$ID] + '&hidenavbar=true'"
}
}

In your canvas app OnStart get the ID parameter and if the varID is not blank display the form in Edit mode otherwise display in view mode.

Set(
    varID,
    Param("ID")
);

If(
    Not(
        IsBlank(varID)
        ),
        EditForm(YourForm),
        ViewForm(YourForm)
   );

 Let me know if this works for you.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,012)