Back to column formats
Column formattingSharePoint Online

Launch Power App Button

Providing a direct link to an item within Power Apps is easy to do using this sample. To use it follow the instructions below to get the link to your Power App (and replace that portion of the format).

Launch Power App Button formatting preview
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

Column formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "attributes": {
    "href": "='https://apps.powerapps.com/play/e34b237b-25d1-462a-9a1c-595780e60d60?tenantId=77786066-d992-41bf-acd7-cf14da844ffd&hidenavbar=true&itemId=' + [$ID]",
    "target": "_blank",
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover",
    "title": "Open in App"
  },
  "style": {
    "border": "none",
    "background-color": "transparent",
    "cursor": "pointer",
    "text-decoration": "none",
    "outline": "none"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "OpenInNewWindow",
        "class": "ms-font-xxl"
      }
    }
  ]
}

From the contributor

How to use this sample

Summary

Providing a direct link to an item within Power Apps is easy to do using this sample. To use it follow the instructions below to get the link to your Power App (and replace that portion of the format).

screenshot of the sample

  1. Login to Power Apps
  2. In your list of Apps, using the 3 dot context menu choose Details
  3. Right-click on the Web link and choose Copy

Copy Link in Power Apps

  1. Replace the first part of the href value in the format (up to the &hidenavbar portion)

Handling the itemId in your Power App

Deep linking in Power Apps is beyond the scope of this sample, but here's an example of how you might be handle it in a Canvas App:

App.OnStart

If(!IsBlank(Param("itemId")) && IsNumeric(Param("itemId")),
    Set(BattleItem, LookUp(Battles,ID=Value(Param("itemId"))));
)

App.StartScreen

If(!IsBlank(Param("itemId")) && IsNumeric(Param("itemId")), scrDetail, scrHome)

View requirements

  • This format can be applied to any column type (its value is ignored)

Tip - You can apply these formats to a Calculated Column with a formula of ="". This prevents the fields from storing data. You can also exclude them from your form by using a Conditional expression of =false.

Sample

Solution Author(s)
generic-launch-powerapp.json Chris Kent

Version history

Version Date Comments
1.0 May 27, 2021 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Additional notes

None