cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TanguyT
Level: Powered On

Dataset control: Property bound to form attribute is not populated

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?
11 REPLIES 11
Super User
Super User

Re: Dataset control: Property bound to form attribute is not populated

HI @TanguyT 

 

Can you please share more details about your edit form and the value you are expecting in the newly added text input control?
Highlighted
TanguyT
Level: Powered On

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
Super User
Super User

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!

TanguyT
Level: Powered On

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
Super User
Super User

Re: Dataset control: Property bound to form attribute is not populated

Oh Yeah! My bad. Apologies for the confusion.

TanguyT
Level: Powered On

Re: Dataset control: Property bound to form attribute is not populated

Anyone from PCF team?

ben-thompson
Level: Powered On

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.

TanguyT
Level: Powered On

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
PowerApps Staff AnqiChen
PowerApps Staff

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-fo...

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