Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

Power Apps Param Function: Get a Parameter From the URL and Open the Right Record

Our help desk lead asked for one small thing: when a new-request alert lands in Teams, the link inside it should open the app right on that request.

That’s a job for the Param function. It reads values from the end of the app’s web link, so a link that ends in &id=2 can open request 2 on the right screen.

In this tutorial, we’ll build that link step by step in a real canvas app, so you’ll see exactly how powerapps get parameter from url works, why every value comes back as text, and what changes when another app opens yours with Launch().

Here’s what we’re building. I opened the published app with &screen=param&id=2&dept=IT%20Help%20Desk at the end of its link, and it landed on the request screen with request 2 already loaded:

Published Power Apps app opened from a URL with id=2, showing Param values and the Password reset #1005 request
  • Param labels that show what the URL passed in (and what it didn’t).
  • A LookUp that turns the text "2" into a real SharePoint item.
  • App.StartScreen that picks the screen from &screen=param.
  • A Launch button in another screen that opens the app the same way.

Before You Start

You need a Power Apps license that lets you build and publish canvas apps, and edit rights to the app. If you’re new to connecting a list, my guide on how to display a SharePoint list in Power Apps covers the basics, and the Power Apps tutorials hub has the rest of this series.

The data is my Service Requests SharePoint list on the SPGuides site. It has 623 items with these columns:

ColumnWhat it holds
TitleRequest name, like Password reset #1005
StatusChoice: New, In Progress or Closed
PriorityChoice, like High
RequesterWho raised the request
DueDateWhen it’s due

These are the first four items by ID. We’ll open IDs 2 and 3 from a URL later:

IDTitleStatus
1Laptop replacement #1000New
2Password reset #1005Closed
3New hire setup #1002Closed
4VPN access #1001In Progress
Service Requests SharePoint list on the SPGuides site used as the Power Apps data source

Build the Demo App Step by Step

If you already have an app connected to a SharePoint list, skip to Step 1. Otherwise, this takes about two minutes:

  1. Go to make.powerapps.com, open Home and select Start with design.
Power Apps maker portal Home page with the Start with design option
  1. Select Create from blank to start a canvas app, then pick the Tablet layout.
Create from blank option for a new Power Apps canvas app
  1. In Studio, select Add data, search for SharePoint and pick the SharePoint connector (a data source is just the list or table your app reads).
Add data pane in Power Apps Studio with the SharePoint connector selected
  1. Paste your site URL, select Connect, check Service Requests and select Connect again.
Choose a list dialog with the Service Requests list selected in Power Apps

Two Studio basics you’ll use in every step: the property dropdown sits left of the fx formula bar and picks which property you’re editing, and Ctrl+S saves. To run the app, select Play (top right) or hold Alt and click a button.

Step 1: Add Labels That Show Each Param Value

First, let’s see what the URL hands the app.

  1. Select New screen > Blank.
  2. Rename it scrParam: select the screen, then the pencil next to its name in the Properties pane.
  3. Insert five Text label controls (Insert > Text label).
  4. Select each label, pick Text in the property dropdown and type one formula from the block below.
Coalesce(Param("id"), "(blank)")
Coalesce(Param("screen"), "(blank)")
Coalesce(Param("ID"), "(blank)")
IsBlank(Param("id"))
Coalesce(Param("dept"), "(blank)")

Coalesce shows (blank) when a parameter is missing, so an empty label never fools you. The third label asks for ID in capitals on purpose (we’ll see why in the test). If IsBlank is new to you, these Power Apps If statement examples use it a lot.

Step 2: Look Up the Request From the id

Param always returns text, even for id=2. A SharePoint ID is a number, so convert the text first.

  1. Insert one more Text label below the others and make it wide.
  2. Set its Text property to this formula:
With(
    {r: LookUp('Service Requests', ID = Value(Param("id")))},
    If(
        IsBlank(r),
        "No id in the URL",
        r.Title & " | " & r.Status.Value & " | " & r.Priority.Value
    )
)

Value() turns "2" into 2 (the Power Apps Value function post has more cases), and LookUp returns the first matching item. The IsBlank(r) check is the guard: no id, or an id that matches nothing, shows a friendly message instead of an empty label.

I like this pattern because ID with = is delegable on SharePoint, so it still finds item 600 in a big list. If that word is new, here’s how delegation works in Power Apps. For more LookUp examples, see Power Apps LookUp on a SharePoint list.

Now select Play in Studio:

Power Apps Studio preview where every Param value is blank and the label says No id in the URL

Checkpoint: in Studio every Param label shows (blank), IsBlank(Param("id")) is true, and the request label says No id in the URL. That’s correct: Studio has no app link with a query string, so Param has nothing to read.

Step 3: Pick the First Screen With App.StartScreen

A link that loads request 2 is useless if the app opens on the home screen. StartScreen decides which screen shows first, once, when the app loads.

  1. In Tree view, select App at the top.
  2. Pick StartScreen in the property dropdown.
  3. Type the formula below (my app also routes two other demo screens).
If(
    Param("screen") = "param",
    scrParam,
    Param("screen") = "combo",
    scrComboDefault,
    Param("screen") = "launch",
    scrLaunch
)
App StartScreen property in Power Apps Studio set to an If formula that checks Param screen

There’s no else branch, so when screen is missing or unknown, StartScreen returns blank and the app opens on the first screen in Tree view. In my app that’s the delegation demo screen, and that’s exactly what the player did with no parameters.

Important: don’t move this into App.OnStart with Navigate. Navigate in OnStart is retired, and global variables set in OnStart aren’t available in StartScreen. Read Param directly here, as above. My post on global vs context variables in Power Apps explains why those variables behave differently.

Checkpoint: in Tree view, select the … next to App and choose Navigate to StartScreen. In Studio the canvas stays on the screen you had selected, because Param(“screen”) is blank there.

Step 4: Publish the App and Copy Its Web Link

Param only gets values in the published app opened from its link, so this step matters.

  1. Press Ctrl+S, then select Publish > Publish this version.
  2. Go to make.powerapps.com > Apps, select your app, then … > Details.
  3. Copy the Web link. It looks like this:
https://apps.powerapps.com/play/e/<environment-id>/a/<app-id>?tenantId=<tenant-id>

The link already starts a query string with ?tenantId=. Every parameter you add goes after it as &name=value.

Test the App With a Real URL

I added three parameters to the web link and opened it in a new browser tab. The space in the department name is written as %20, because URLs can’t carry raw spaces:

https://apps.powerapps.com/play/e/<environment-id>/a/<app-id>?tenantId=<tenant-id>&screen=param&id=2&dept=IT%20Help%20Desk

The first time, the player asked Allow Service Desk Demo to access your data? for the SharePoint connection. When I picked Don’t allow, it stopped on a Consent needed message. After Allow, the app opened straight on scrParam, as in the screenshot at the top.

LabelResultWhy
Param(“id”)2Passed as id=2, read as text
Param(“screen”)paramStartScreen used it to pick scrParam
Param(“ID”)(blank)Names are case-sensitive
IsBlank(Param(“id”))falseid was passed
Param(“dept”)IT Help Desk%20 is decoded back to a space

And the LookUp label showed Password reset #1005 | Closed | High, which is item 2 in the list.

Make It Dynamic: Open the App From Another App With Launch()

Inside Power Apps, a button can build the link for you. My scrLaunch screen has a gallery of the first four requests:

FirstN(Sort('Service Requests', ID, SortOrder.Ascending), 4)
  1. Insert a Button next to the gallery and select it (how the button OnSelect property works if you haven’t used it).
  2. Pick OnSelect in the property dropdown.
  3. Type the Launch formula with your own app ID:
Launch(
    "/providers/Microsoft.PowerApps/apps/<your-app-id>",
    {screen: "param", id: galLaunch.Selected.ID}
)
Launch button OnSelect formula passing screen and the selected gallery ID to another Power Apps app

The address is the App URI, your app ID with /providers/Microsoft.PowerApps/apps/ in front. The record {screen: "param", id: ...} becomes the parameters, and Power Apps URL-encodes them for you.

In the published app I selected New hire setup #1002 (ID 3) and clicked the button. A new tab opened directly on scrParam:

Power Apps app opened by Launch from another app with id 3 showing New hire setup #1002

Param(“id”) was 3, the request label said New hire setup #1002 | Closed | High, and dept was blank because the button didn’t send one.

Note: test this from the published app. When I clicked the same button in Studio Preview, it opened the Studio edit page in a new tab instead of the player.

Troubleshooting Param Problems

  • Every value is blank in Studio. Expected. Publish and open the web link with your parameters added.
  • The value is blank in the player too. Check the case: Param("ID") doesn’t read &id=2. Also check the parameter comes after ?tenantId=... with an &.
  • The LookUp finds nothing. Param returns text. Wrap it in Value() before you compare it with a number column like ID.
  • A parameter never arrives. Its name may be reserved. Microsoft reserves names like source, site, theme, locale and tenantId. Names like screen, id or dept are safe.
  • The app opens on the first screen. StartScreen returned blank or an error. Check the spelling of the value in the URL against your If().
  • Old values stay on a phone. Param values don’t refresh while the app is already running on mobile. The app has to reload.

Where to Take It Next

A few more posts that pair well with deep links like this one:

Frequently Asked Questions

How do I get a parameter from the URL in Power Apps?

Add &name=value to the app’s web link after ?tenantId=..., publish the app, and read it with Param("name"). The Launch and Param functions reference on Microsoft Learn has the full syntax.

Why does Param return blank in Power Apps Studio?

Studio and its Preview don’t open the app from a web link with a query string, so there’s nothing to read. Publish the app and open the web link with your parameters added.

Is the Power Apps Param function case-sensitive?

Yes. In my test, Param("id") returned 2 and Param("ID") returned blank from the same URL. Use the exact same spelling in the link and the formula.

How do I open a specific screen from a URL in Power Apps?

Set App.StartScreen to an If() that checks Param, for example If(Param("screen") = "param", scrParam). StartScreen runs once at load and can’t use OnStart variables; the App object reference explains the rules.

Does Param return a number?

No. Param always returns text, even for id=2. Use Value(Param("id")) before comparing it with a number column such as the SharePoint ID.