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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Howto make a button co...
Power Apps
Suggested Answer

Howto make a button component that passes a parameter to a screen

(1) ShareShare
ReportReport
Posted on by 2
I have tried to make a Button component that sends a paramater to another screen through the Navigate function.
This command works fine when entered in OnSelect directly on a button on a screen (not via component):
Navigate(Screen2,ScreenTransition.Fade, {sendparam: "hello"})
 
If I understood correctly, it is not possible to use a context variable in Navigate in a Component. 
Have asked both Chatgpt, Copilot, Grok and Deepseek - but no solution.
 
Anyone done this ?
And can share an example of a working component ?

Thanks a lot in advance !
 

 
 
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,834 Super User 2026 Season 1 on at
     

    You're trying to pass a parameter from a Power Apps component to another screen using the Navigate function, and you're encountering issues when doing this from within a component. Let’s break this down and clarify what works—and what doesn’t.


    What Works (and Why)

    When you use Navigate(Screen2, ScreenTransition.Fade, {sendparam: "hello"}) directly on a screen control (like a button), it works because the Navigate function supports passing context variables to the target screen. These variables are scoped to the screen and are available as soon as the screen loads.

    This is confirmed by Microsoft Learn documentation  and community examples .


    Why It Fails in a Component

    Power Apps components are isolated from the app’s screen context. This means:

    • You cannot directly use Navigate(..., ..., {param}) inside a component to pass parameters to a screen.
    • Components do not have access to screen context variables or the ability to define them directly.

     Workaround: Use Custom Properties

    To pass parameters from a component to a screen, you can use custom output properties in the component. Here’s how:

    1. Create an Output Property in your component (e.g., SelectedValue).
    2. Set the property based on user interaction inside the component (e.g., when a button is clicked).
    3. Use the component in a screen, and bind the output property to a variable or directly in the Navigate call.

    Example:

    // OnSelect of a button outside the component

    Navigate(Screen2, ScreenTransition.Fade, { sendparam: MyComponent.SelectedValue })

    🏷️ Tag me if you have any further questions or if the issue persists.

    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.

    ❤️ Give it a Like if you found the approach useful in any way.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard