web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

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

How to use filter and search in PCF for React

Like (0) ShareShare
ReportReport
Posted on 23 Oct 2019 08:24:13 by 63

Hi,

I want to use the filter and search function in my react app for a model driven powerapp with PCF.

The documentation describes not how to use it in javascript correctly. Has someone information about this?

Do I have to import some additional React components?

 

Here is a description of filtering but there is no example or full description on how to use it:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/filtering

 

Best regards

  • ScottDurow Profile Picture
    1,039 on 31 Oct 2019 at 08:11:52
    Re: How to use filter and search in PCF for React
    I believe that more documentation is in the works!
  • fs92 Profile Picture
    63 on 29 Oct 2019 at 08:47:58
    Re: How to use filter and search in PCF for React
    Thanks for your reply.
    Is there another documentation or guides on how to use filters and conditions? The documentation on the PCF site isn’t good currently
  • Verified answer
    ScottDurow Profile Picture
    1,039 on 24 Oct 2019 at 09:53:32
    Re: How to use filter and search in PCF for React

    There really isn't any difference using this in React or not - the setFilter accepts a FilterExpression https://docs.microsoft.com/en-us/powerapps/developer/component-framework/reference/filterexpression

     

    You can use as follows:

    const expression = {
     name: "account",
     from: "accountid",
     to: "parentcustomerid",
     linkType: "inner",
     alias: "parentaccount ",
    };
    
    _context.parameters.sampleDataset.linking.addLinkedEntity(expression);
    const condition = {
     attributeName: "accountid",
     conditionOperator: 79, // Equal or Under
     value: _context.page.entityId,
     entityAliasName: "parentaccount",
    };
    const conditionArray = [];
    conditionArray.push(condition);
    _context.parameters.sampleDataset.filtering.setFilter({
     conditions: conditionArray,
     filterOperator: 1, // Or
    });
    _context.parameters.sampleDataset.refresh();

    Hope this helps

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 our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete