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 / PCF control on subgrid
Power Apps
Unanswered

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();

I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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,

  • Sharath123 Profile Picture
    7 on at

    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,
            });

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard