Skip to main content

Notifications

Community site session details

Community site session details

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

PCF control on subgrid

(0) ShareShare
ReportReport
Posted on by 7

I've created a PCF control on subgrid, we're using office ui fabric react and react nuget packages. We're trying to filter the subgrid using below code. but the subgrid displays all record and filter is not applying on subgrid.

enum condOperators {
Equal,
}
var condition = {
attributeName: "msdyn_account",
conditionOperator: condOperators.Equal,
value: "{3c11d08a-4751-ea11-a813-000d3a7f1cdc}",
entityAliasName: "msdyn_payment"
};

 

context.parameters.sampleDataSet.filtering.setFilter({
conditions: [condition],
filterOperator: 0
});
context.parameters.sampleDataSet.refresh();

  • Sharath123 Profile Picture
    7 on at
    Re: PCF control on subgrid

    Thanks for the response, there is a heirarchy on account Entity, I'm trying to achieve above or equal in the query for account, but this doesn't yield me any results, below is the code that i'm using. Could you please help me on this.

     

    context.parameters.sampleDataSet.filtering.setFilter({
                conditions: [{
                    attributeName: "msdyn_account",
                    conditionOperator: 78// Above or equal
                    value: context.page.entityId // Remove '{' and '}' symbol which wrapped the GUID value
                }],
                filterOperator: 0,
            });
  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: PCF control on subgrid

    Hi @sharaths463 ,

    Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, and the Filtering formula works well.

     

    The screenshot of my TypeScript code as below:

    9.JPG

    On your side, you should modify your formula as below:

    var condition = {
     attributeName: "msdyn_account",
     conditionOperator: 0, // Specify 0 here rather than Enum value you defined here
     value: "3c11d08a-4751-ea11-a813-000d3a7f1cdc", // Remove '{' and '}' symbol which wrapped the GUID value
     entityAliasName: "msdyn_payment"
    };
    var conditionArray = [];
    conditionArray.push(condition);
    context.parameters.sampleDataSet.filtering.setFilter({
     conditions: conditionArray ,
     filterOperator: 0
    });
    context.parameters.sampleDataSet.refresh();

    More details about supported values for conditionOperator in PowerApps Component Framework, please refer to following article:

    https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/conditionexpression#conditionoperator

     

    Please also check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/Power-Apps-Pro-Dev-ISV/How-to-use-filter-and-search-in-PCF-for-React/td-p/388748

     

    Best regards,

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 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…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 89 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 72 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard