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 / Finding the attribute ...
Power Apps
Unanswered

Finding the attribute the control is bound to

(0) ShareShare
ReportReport
Posted on by 14

Can this be done? 

 

I'm in debug, looking at "this" which is a type of my control but I can't see any obvious property that would tell me the attribute I'm currently bound to.

 

Has anyone come across this?

I have the same question (0)
  • Hemant Gaur Profile Picture
    on at
    When the control is bound to any field it only has the contract of attribute type and value. Adding any special handling inside control implmentaton means that control is not generically reuseable/configurable anymore.
    If there is a special case you can use WebAPI/Utility methods. Ideally controls should use just utilize  context.parameters.controlValue.* where conrolValue is declared manifest property.
     
    What scenario you are trying to acheive ? 
  • mbeard Profile Picture
    14 on at
    Making an address control - except people could have multiple addresses. So I’d like to dynamically allow a user to selected an address and it populates the relevant address based on which line1 was typed into.

    Ideally I didn’t want to make a user manually select all address fields during configuration
  • Verified answer
    Hemant Gaur Profile Picture
    on at

    Currently the address fields have issue configuring to the custom components and you will hit this. This was blocked by composite control team I beleive as address was one composite control in legacy interface. We are evaluating to make this consistent.

     

    For your scenario, you can create custom fields on the entity for address components like street, city etc. Write the client API to populate these fields from any address 1,2,3 user chooses and bind these to the custom component. 

     

    I build one using azure cognitive to autofill address (control bound to just one dummy field) and as user types dropwon is populaed based on the search results from azure. On user selection fields are populaed back to the individual address fields (custom again as OOB address fields cannot be configured to components)..

     

    Let me know if you need to see that code 🙂

  • mbeard Profile Picture
    14 on at

    I can still bind to individual address fields, do you foresee that being a problem?

     

    I've just made a input property like this:

    of-type="SingleLine.Text" usage="input"

    and will ask users to manually type in the field they are binding too for now. Not the end of the world.

     

    Thanks.

  • Hemant Gaur Profile Picture
    on at

    Manually typing in the field is not something which is supported. I havent tried this but you might run into issues saving back the values to those fields. Probably creating a shadow field and using the PBL or client API is the best bet. 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard