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 / OnSelect action on com...
Power Apps
Unanswered

OnSelect action on components to navigate to screen

(1) ShareShare
ReportReport
Posted on by 7

I am trying to build an app in which when in click the component that has an image and title, I should be directed to its corresponding page (screen).

 

The home page looks like the following:

ARJ_1-1651507808017.png

 

One of the component which I tried to link to its corresponding screen is as follows:

ARJ_2-1651507916755.png

 

I do not understand why the component cannot navigate to an existing screen. What am I missing?

 

Thank you.

Categories:
I have the same question (0)
  • Silvester. Akakpo Profile Picture
    783 on at

    Hello @ARJ ,
    Components have limitations, you cannot reference a screen in a component. The component will not recognize the name of the screen. Components are mostly decoupled from apps. Read more here

    https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/create-component?msclkid=178954aeca3711ecb3f54167eec705f1#known-limitations

    If you find this post helpful, give it a like or accept it as solution to help  others find it

  • ARJ Profile Picture
    7 on at

    Ok. I understand that the facility is not available. Is there a workaround using something such as a custom property?

     

    I was referring to this link in particular: Solved: Navigation from Dialog Components - Power Platform Community (microsoft.com). Can having two invisible button solve this issue? 

  • Silvester. Akakpo Profile Picture
    783 on at

    Yes. A custom component is not a bad idea. You can make button transparent to overlay the object an make sure the button is on top of the object or component. You can even use a label to achieve that. it should work.

    if it works, do give a thumbs up and accept this as a solution to enable others to find it.

     

  • Suggested answer
    BM-03092043-0 Profile Picture
    4 on at
    You can now pass a screen to a component as a custom input variable and then call navigate in the onselect property. 

    your onselect would look similar to:

    Navigate(ComponentName.InputName)




  • timl Profile Picture
    36,383 Super User 2025 Season 2 on at
    Hi ARJ,
     
    The second screenshot that you posted isn't appearing for me. 
     
    If you want to navigate to another screen when clicking the component, another method is to define an Event Property in the component (which you will raise when the user clicks a control in the component). 
     
     
    You can then handle the event in the host screen by calling the Navigate function.
  • inanoffice23 Profile Picture
    299 Moderator on at
     
    Thank you for the tip regarding Screen,  I almost got it working
     
    In my Library component
     
    I have custom properties
     
    - OnButtonClicked, Event, no parameters and no return data type
    - TargetScreen, Data, Input, Screen
     
    I have a gallery, and in the 'edit' button inside the gallery, I have this
     
    Select(Parent);
    ActionsGalleryComponent.OnButtonClicked()
    
    In my parent app, when I try the below from outside the component with a button, it works
    Navigate(ActionsGallery_1.TargetScreen)
    If I try to add that same code in my OnButtonClicked, it won't navigate
     
    In fact OnButtonClicked doesn't even want to navigate to a normal screen like 
     
    Navigate(Colours)
    I am navigating to a single record, and it has complex columns like look up and choice columns, so I always rebuild the record so it can show all the fields properly
     
    Not too sure what I am missing, at the moment user has to select gallery record, and then the button. I can't seem to just let the user click on the gallery record and navigate smoothly like your normal gallery would
     
    I have raised this here too, to no avail How to navigate from a gallery that is in a Library Component?
  • inanoffice23 Profile Picture
    299 Moderator on at
    I have fixed it at last :)
     
    I had some sample data OnButtonClicked in my Event in the library component, I deleted it and it now works
     
    Inside the edit button, on select from the gallery item
     
    Select(Parent);
    ActionsGalleryComponent.OnButtonClicked()
     
    2 more custom properties
     
    TargetScreen of type Screen
    SelectedActionFromGallery, data, output, record
     
    In the parent app
     
    On visible screen, set the variable Set(GotoAction, 'Name of your screen')
    TargetScreen add GoToAction (it cannot accept screen name directly as it wants a Control)
    OnButtonClicked has not only the navigation, but also I specify how the record is meant to look like, otherwise it won't work, see sample in this post How to navigate from a gallery that is in a Library Component?
     
     

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard