Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Param function not capturing value

(0) ShareShare
ReportReport
Posted on by 21,973 Super User 2025 Season 1

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?

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Param function not capturing value

    @BCBuizer 

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

  • BCBuizer Profile Picture
    21,973 Super User 2025 Season 1 on at
    Re: Param function not capturing value

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

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Param function not capturing value

    @BCBuizer 

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

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Param function not capturing value

    @BCBuizer 

    Oh sorry, should have put in quotes:

    Set(variable, LookUp([DataSource], Title=Param("Document")))
  • BCBuizer Profile Picture
    21,973 Super User 2025 Season 1 on at
    Re: Param function not capturing value

    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,287 Super User 2024 Season 1 on at
    Re: Param function not capturing value

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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard