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 / Is there a generic cod...
Power Apps
Answered

Is there a generic code for referencing another bit of the same selected object?

(0) ShareShare
ReportReport
Posted on by 4

Hi,

I was wondering if there was a way similar to Parent.Width but with the selected rectangle for example so you can reference the X in the width code. Would make applying code to lots of datacards easier.

Thanks

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    37,143 Super User 2026 Season 1 on at

    @BB820747 

    The Self keyword enables you to access other properties in the same control.

    https://learn.microsoft.com/en-gb/power-platform/power-fx/reference/operators#self-and-parent-operators

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @BB820747 

     

    If I understand you well, you can use refer to the control name of the Rectangle.

     

    then on your datacard, you can just say Rectangle1.Width 

    cha_cha_0-1686653678878.png

     

  • BB820747 Profile Picture
    4 on at

    Thank you knew there was something just couldn't remember

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 893

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 482

Last 30 days Overall leaderboard