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();
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.
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:
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:
Please also check and see if the following thread would help in your scenario:
Best regards,
WarrenBelz
89
Most Valuable Professional
Michael E. Gernaey
72
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1