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 Apps
Unanswered

Parent.OnSelect()

(0) ShareShare
ReportReport
Posted on by 78

Lets say I have a gallery and each item in this gallery contains of BackgroundShape, ForegroundShape and TextBox (Look at the screenshot) .

Capture20.PNG

Since this is considered one big complex control I want all of them to execute the same OnSelect() action. Which forces me to duplicate my function for BackgroundShape, ForegroundShape and TextBox. Can I somehow apply my function only to BackgroundShape and then use Parent.OnSelect for ForegroundShape and TextBox? How can I avoid code duplication in this case?

Categories:
I have the same question (0)
  • hpkeong Profile Picture
    2,944 on at

    HI

     

    Wish I understand your idea.

    Why not, when within the gallery, insert a button, make the color fill as null and set the function into OnSelect.

    Place this button overlapping on top of all the 3 shapes?

    Hope I understand what you want.

     

    Have a nice day.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 387

#3
timl Profile Picture

timl 344 Super User 2026 Season 1

Last 30 days Overall leaderboard