Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Dataset control: Property bound to form attribute is not populated

(0) ShareShare
ReportReport
Posted on by 113 Most Valuable Professional
I have created a dataset control. I would like to filter the content of this control based on a form property.
So I created a new property of type input and in the form designer, I bound this property to an attribute.
When the control code is executing, this property is always undefined.
Is that expected?
  • AnqiChen Profile Picture
    on at
    Re: Dataset control: Property bound to form attribute is not populated

    hi Tanguy,

     

    Regarding the case,

    "For example, display only records that have the optionset category set to 'Business' if the parent record is set to 'Business' too."

     

    The general pattern we believe its manifest should look like below:

     

    <property   name="property1" bound>

    <property   name="property2" bound>

    ......

    <property   name="propertyN" bound>

    <dataset>

          <property-set name="aliasOfProperty" bound>

          .......

    </dataset>

     

    • The first N property is used to get the bounded fields' value.
    • The <data-set> is used to send the request and get the data
    • The request sent by <data-set> needs to have 'filtering' per this ask. And we do have API setFilter/refresh that would easily help to setFilter. But it needs to know which 'column' need to put the filter on. Hence, it needs <property-set> configuration to let the control know the right 'column' for filtering

    Regarding the  setFilter/refresh/clearFilter/find_right_column. We do have sample controls (they might not in doc at this moment). I attached the sample control solution and the source code.

     

    The sample control is a data-set control will help you be familiar with the filtering related API and how to find right column. You could put it on any entity home page grid. There will have a 'search box' in the control and it will be searched based on your configurd 'property-set'.

     

    Also, the sample control is a data-set control does not mean these code only applied to 'data-set' control. It works also when 'data-set' is not at first place.

     

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Dataset control: Property bound to form attribute is not populated

    It does not have to be a lookup. It could be any type of attribute eventually.

     

    Let's say I want to display only records that have the same optionset, boolean or string value on both entities.

     

    For example, display only records that have the optionset category set to 'Business' if the parent record is set to 'Business' too.

  • AnqiChen Profile Picture
    on at
    Re: Dataset control: Property bound to form attribute is not populated

    hi Tanguy,

     

    For functionally realize what u need, the dataset results will be updated based on an attribute(lookup attribute) change, it's more like the quick view form scenario and Dynamics do have a OOB way for this

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/create-edit-quick-view-forms

    You could create a quick view form and have the subgrid on it. Then the subgrid should listen to the quick view form's bound lookup value update.

     

    Regarding PowerApps Component Framework solution,

    Please note, a control with a bound property and a <data-set> is treated as a field control, not a data-set control.

    But even it's a field control, I guess you could have <data-set> as 2nd propery and do request and render. Visually it should be similar to a traditional data-set control

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Dataset control: Property bound to form attribute is not populated
    That might do it but the contextinfo.entitytype gives me the name of the related entity instead of the parent entity. So I can’t use web api since i don’t know what entity to query
  • Ben Thompson Profile Picture
    1,400 on at
    Re: Dataset control: Property bound to form attribute is not populated

    I'm not the PCF team but I can say that I've not been able to get a field value bound to a dataset control. 

     

    What I've ended up doing was using a webapi request to retrieve the value from the form that way ( you need to read the dataset to get the entity and (context.mode as any).contextInfo to get the guid of the record the grid is on.

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Dataset control: Property bound to form attribute is not populated

    Anyone from PCF team?

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Dataset control: Property bound to form attribute is not populated

    Oh Yeah! My bad. Apologies for the confusion.

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Dataset control: Property bound to form attribute is not populated
    I guess you did not notice that I’m talking about Powerapps Components Framework.
    Nothing to do with canvas apps
  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Dataset control: Property bound to form attribute is not populated

    HI @TanguyT 

     

    I carried a simple test on my side and I am able to filter out the results based on the item selected in Edit Form. Please refer to below expression and the screenshot.
     
    Expression: 
    Filter(TestList,Title = DataCardValue3.Text)
    Here, TestList is my SP list with a column Title and I have mapped it to value inside the edit form.
     
    Please make sure you are referring to correct control inside the form. 
    MicrosoftTeams-image (138).png

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Tanguy TOUZARD Profile Picture
    113 Most Valuable Professional on at
    Re: Dataset control: Property bound to form attribute is not populated
    What I want in the end is my dataset control displays only related records that respect a condition based on a form attribute value.
    So I created a property of type “input” (not in the dataset, but in the control) and was expecting that I can bind it to a form attribute. I can actually but the value is never set in the property.
    For example, I have bound this property with attribute “name” on Account form. I am expecting that this property contains the name of the account when it is rendered. Unfortunately, the name of the account is never available and the property is always undefined
    So I cannot filter my dataset display

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard