cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BCBuizer
Resolver III
Resolver III

Param function not capturing value

Hi All,

 

I'm running into the strangest issue with the Param() function as it doesn't seem to capture the passed value. The URL I'm using looks like this:

 

https://apps.powerapps.com/play/[appId]?tenantId=[tenantId]?Document=[TextValue]

 

The code I have in my OnStart and StartScreen wasn't working as the users are not navigated to the expected screen (screen2), showing the expected data (variable). I then added a label to see what value was passed with Param (Document) and it seems to be a blank, regardless of what I pass for TextValue. 

 

OnStart = If(IsBlank(Param(Document)),true,Set(variable,LookUp([DataSource], Title=Param(Document)))

StartScreen = If(IsBlank(Param(Document)),Screen1,Screen2)

TSLabel Text = Param(Document)

 

What am I missing?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@BCBuizer 

And same in your StartScreen...need quotes there too.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

6 REPLIES 6
RandyHayes
Super User
Super User

@BCBuizer 

Your parameter in the url needs an ampersand, not a question mark.

i.e.

https://apps.powerapps.com/play/[appId]?tenantId=[tenantId]&Document=[TextValue]

Also, you can alter the OnStart to the following:

Set(variable, LookUp([DataSource], Title=Param(Document)))

Your variable will be blank if there is no param...which is the same as you had in your other formula.  So, you can cut out the extra parts.

Your StartScreen is already referring to the param value, so that will all be fine.

 

I hope this is helpful for you. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @RandyHayes,

 

Thanks for the quick reply and the tips on streamlining the OnStart.

 

Sorry I failed to mention I did try the ampersand with the same result:

 

https://apps.powerapps.com/play/[AppId]?tenantId=[tenantId]&Document=[TextValue]
RandyHayes
Super User
Super User

@BCBuizer 

Oh sorry, should have put in quotes:

Set(variable, LookUp([DataSource], Title=Param("Document")))
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
RandyHayes
Super User
Super User

@BCBuizer 

And same in your StartScreen...need quotes there too.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Yep, that is what I missed... Thanks!

RandyHayes
Super User
Super User

@BCBuizer 

Sometimes it's hard to see the forest from the trees 😁

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,939)