web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Param function not cap...
Power Apps
Unanswered

Param function not capturing value

(0) ShareShare
ReportReport
Posted on by 22,505 Super User 2025 Season 2

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?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @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. 

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    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 Profile Picture
    76,297 Super User 2024 Season 1 on at

    @BCBuizer 

    Oh sorry, should have put in quotes:

    Set(variable, LookUp([DataSource], Title=Param("Document")))
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @BCBuizer 

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

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

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

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @BCBuizer 

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard