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 / OOB Show chart not wor...
Power Apps
Answered

OOB Show chart not working :PCF

(0) ShareShare
ReportReport
Posted on by 78

Hello All,

I have created a custom control and apply that control to the new system opportunity view but what it noticed is OOB show chart is not working.

 

board.png

 

When I debug I found below error from developer tools.

Capture.PNG

 

I am fetching the link entity data (BPF Entity )from the custom control like below.

 this.contextObj.utils
            .getEntityMetadata(
                this.contextObj.parameters.sampleDataSet.getTargetEntityType()
            )
            .then(r => {
                this.contextObj.utils
                    .getEntityMetadata(this._dropdownvalue)
                    .then(b => {
                        this._bpfLinkingAttributeName = b.IsCustomEntity
                            ? `bpf_${r.PrimaryIdAttribute}`
                            : r.PrimaryIdAttribute;
                        this.contextObj.parameters.sampleDataSet.linking.addLinkedEntity({
                            name: uniquename,
                            from: this._bpfLinkingAttributeName,
                            to: r.PrimaryIdAttribute,
                            linkType: "inner",
                            alias: "bpfentity"
                        });
                        if (this.contextObj.parameters.sampleDataSet.addColumn) {
                            this.contextObj.parameters.sampleDataSet.addColumn(
                                "activestageid",
                                "bpfentity"
                            );
                            this.contextObj.parameters.sampleDataSet.addColumn(
                                "processid",
                                "bpfentity"
                            );
                            this.contextObj.parameters.sampleDataSet.addColumn(
                                "createdby",
                                "bpfentity"
                            );
                            this.contextObj.parameters.sampleDataSet.addColumn(
                                "traversedpath",
                                "bpfentity"
                            );
                            this.contextObj.parameters.sampleDataSet.addColumn(
                                "businessprocessflowinstanceid",
                                "bpfentity"
                            );
                            this.contextObj.parameters.sampleDataSet.addColumn(
                                "statuscode",
                                "bpfentity"
                            );
                        }
                    })
                    .then(() => {       
                     
                        const conditionArray: any = [];
                        var condition = {
                            attributeName: "statuscode",
                            conditionOperator: 1, // NotEqual
                            value: 3,
                            entityAliasName: this._dropdownvalue,
                        };
                        conditionArray.push(condition);
                        this.contextObj.parameters.sampleDataSet.filtering.setFilter({
                            conditions: conditionArray,
                            filterOperator: 0, // And
                        });
                        this.contextObj.parameters.sampleDataSet.refresh();
                    });

            });
 
Can anyone please let me know what I am doing wrong here ?

 

I have the same question (0)
  • Verified answer
    Ben Thompson Profile Picture
    1,400 on at

    When you add a filter the DataSet changes to the Quickfind view (as it does elsewhere in CE).

     

    https://powerusers.microsoft.com/t5/Power-Apps-Component-Framework/Reading-filters-setting-filters-and-controlling-columns/m-p/362839#M889 has a fully discussion about it and how to handle it - note that Scott Durow is the person asking the original questions - Datasets are complex with a lot of gotchas that will surprise you.

  • Bhuvita Sisodiya07 Profile Picture
    78 on at

    @a-ovbord 

    Below is my opportunity view filter criteria.

    image.png

     

    So when i try to fetch the BPF entity data from my PCF control (code pasted in initial post) and add the link entity data columns in existing context and use this data to build my control.

     

    But if i give filter criteria like below on related BPF entity the chart is not working. 

    const conditionArray: any = [];
                            var condition = {
                                attributeName: "statuscode",
                                conditionOperator: 1, // NotEqual
                                value: 3,
                                entityAliasName: bpfentity,
                            };
                            conditionArray.push(condition);
                            this.contextObj.parameters.sampleDataSet.filtering.setFilter({
                                conditions: conditionArray,
                                filterOperator: 0, // And
                            });
                            this.contextObj.parameters.sampleDataSet.refresh();
                        });

    If i remove this criteria then chart again works.

     

  • Bhuvita Sisodiya07 Profile Picture
    78 on at

    @a-ovbord 

    Below is my opportunity view filter criteria :

     
     

    I am trying to fetch the BPF entity (opportunitysalesprocess or any BPF entity) data related to the opportunity entity and put filter on that related entity data through my PCF control and use this data to build the PCF control.

     

       this.contextObj.parameters.sampleDataSet.linking.addLinkedEntity({
                                name: uniquename,  //it will be BPF entity name
                                from: this._bpfLinkingAttributeName,  //this will be linking attribute
                                to: r.PrimaryIdAttribute,
                                linkType: "inner",
                                alias: "bpfentity"
                            });

     

    if (this.contextObj.parameters.sampleDataSet.addColumn) {
                                this.contextObj.parameters.sampleDataSet.addColumn(
                                    "activestageid",
                                    "bpfentity"
                                );
                                this.contextObj.parameters.sampleDataSet.addColumn(
                                    "processid",
                                    "bpfentity"
                                );
                                this.contextObj.parameters.sampleDataSet.addColumn(
                                    "createdby",
                                    "bpfentity"
                                );
                                this.contextObj.parameters.sampleDataSet.addColumn(
                                    "traversedpath",
                                    "bpfentity"
                                );
                                this.contextObj.parameters.sampleDataSet.addColumn(
                                    "businessprocessflowinstanceid",
                                    "bpfentity"
                                );
                                this.contextObj.parameters.sampleDataSet.addColumn(
                                    "statuscode",
                                    "bpfentity"
                                );
                            }

                           var condition = {
                                attributeName: "statuscode",
                                conditionOperator: 1, // NotEqual
                                value: 3,
                                entityAliasName: bpfentity,
                            };
                            conditionArray.push(condition);
                            this.contextObj.parameters.sampleDataSet.filtering.setFilter({
                                conditions: conditionArray,
                                filterOperator: 0, // And
                            });
                            this.contextObj.parameters.sampleDataSet.refresh();
                        });

     

    So the issue if we put filter on the related entity data the chart does not work.If i remove the filter the chart works.

     

  • a-ovbord Profile Picture
    on at

    Hi @Bhuvita,

     

    I believe you are trying to customize one of the views from the Opportunity entity inside a Dynamics 365 CRM organization with UCI.

    If my assumption is correct, then the right place to check this would be on the Dynamics forum: https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum or to open a service request through the Power Platform Admin Center: https://admin.powerplatform.microsoft.com/support

     

    Thank you,

    Ovidiu

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
Kalathiya Profile Picture

Kalathiya 401

#2
WarrenBelz Profile Picture

WarrenBelz 334 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard