cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WarrenOwen
New Member

Referencing a URL Parameter in a Canvas App

I'm pretty new to PowerApps, but this is simply puzzling me.

 

I want to pass a URL parameter into a PowerApp to set the default value on a field in a new form (from a Power BI report - don't want to embed the app in the report page, a new page for the PowerApp works nicely and I can generate the URL with parameter dynamically from my power bi report)

 

But I can't seem to reference the "potential" parameter in Power Apps Studio, it just generates an error when I reference Param(myref) because it doesn't have a URL passing the parameter at that point - it doesn't recognise myref as a valid name. I wondered if you need to declare it ahead of time, but can't seem to see how from googling today. The guides all seem to gloss over how they successfully reference a parameter name that Studio doesn't recognise, so I guess I'm missing something obvious here.

 

Help is appreciated! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
SkiDK
Solution Sage
Solution Sage

Hi @WarrenOwen 

 

You have to access the parameter like next with the quotes

 

Param("myref")

 

 

And you might want to check if it's empty or not if there's logic build around the parameter:

 

If(
  Not(IsBlank(Param("myref"))),
  ...,
  ...
)

 

 

Hope that helps!

View solution in original post

2 REPLIES 2
SkiDK
Solution Sage
Solution Sage

Hi @WarrenOwen 

 

You have to access the parameter like next with the quotes

 

Param("myref")

 

 

And you might want to check if it's empty or not if there's logic build around the parameter:

 

If(
  Not(IsBlank(Param("myref"))),
  ...,
  ...
)

 

 

Hope that helps!

WarrenOwen
New Member

Doh! Had to be something obvious 🙂 Thanks. that has fixed it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,090)