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 / On-select event in Com...
Power Apps
Answered

On-select event in Component

(0) ShareShare
ReportReport
Posted on by 19

Hi,

I'm working with Custom Component and I added a button in component. Can I set different on-select event in that button when use component in different screen?

Ex: Screen A  ----- button on-select do function X

     Screen B   ----  button on-select do function Y

Thanks for reading!

 

Categories:
I have the same question (0)
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Have an input property that Defines the Screen Name as a text field, then you can pass in whatever value you want for that on each screen and have your code check if(component1.screenname="Screen 1" then do XYZ)

  • Seledy Profile Picture
    19 on at

    Thanks for your solution!

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 510

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 281

Last 30 days Overall leaderboard