Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

Filter list depending on what is entered in a text field

(0) ShareShare
ReportReport
Posted on by 312

Hello community, I am working with a portal in power apps.

I am trying to filter the list shown to the right, based on the text entered in the "Title" field of my form. In a certain way I want to filter the "Keywords" list by what is entered in the "Title" field.

MartinVargas_0-1664984271943.png

 


This is the javascript that I have implemented

function onPrimaryChange(){

 // get id of selected primary field

 // this will work only if you render primary field as dropdown

 let primaryValue = $("#title").val();

 var list = $(".entity-grid");

 

 if(primaryValue != null && primaryValue !=""){

 console.log("titulo:" + primaryValue);

 

list.find("table tbody > tr").each(function () {

 var tr = $(this);

 //var adminOnly = $(tr).find('td[data-attribute="title"]').attr("aria-label");

 var adminOnly = $(tr).find('td[data-attribute="title"]').attr("data-value");

 //console.log("prueba1: " + adminOnly);

 if (!adminOnly.includes(primaryValue)){

 tr.hide();

 list.show();

 }

 else

 {

 tr.show();

 list.hide();

 }

 });

 }else if(primaryValue == null || primaryValue =="")

 {

 list.hide();

 }

 }

 

 

Any ideas?
@OliverRodrigues 

@OOlashyn 

@justinburch 

 

 


Can someone help me here?

Thanks cheers.

Categories:
  • oliver.rodrigues Profile Picture
    9,315 Most Valuable Professional on at
    Re: Filter list depending on what is entered in a text field

    Thanks for the info, this feature is actually OOB from Power Apps Portals with case management:

    How to add Knowledge Base Articles in Power Apps Portals | Magnetism Solutions | NZ (Auckland, Wellington, Christchurch and Dunedin)

    Configure and manage category for knowledge articles - Power Apps | Microsoft Learn

    hope this helps 

  • MartinVargas Profile Picture
    312 on at
    Re: Filter list depending on what is entered in a text field

    Hi @OliverRodrigues 

     

    -Is your list a subgrid or a list?
    It's a list of a table I have in dataverse.

    -Does the filter have to happen while writing?
    It is correct, the filter must be executed when the value entered by the user changes, in this case in the title field.

    -What is the business requirement for this?
    The commercial requirement is that our clients can raise tickets through our page, at this moment I am working on the form filling section and when the client enters his problem in the title section, our list should show the knowledge articles that match the keywords entered by the client so that the client has the opportunity to self-serve and if possible can solve their problems through these articles.

     

    Ready friend!

  • oliver.rodrigues Profile Picture
    9,315 Most Valuable Professional on at
    Re: Filter list depending on what is entered in a text field

    a few more questions:

    • is your list s subgrid or a list?
    • is the filter to happen while typing?
    • what's the business requirement for this? 
  • MartinVargas Profile Picture
    312 on at
    Re: Filter list depending on what is entered in a text field

    Hi @OliverRodrigues , I am using a custom filter in javascript and a form. My situation is that when entering information in a field of my form, I should filter my list if any word entered matches the field of the form.

     

    Greetings.

  • oliver.rodrigues Profile Picture
    9,315 Most Valuable Professional on at
    Re: Filter list depending on what is entered in a text field

    Hi, are you using a complete custom JavaScript filter? or the OOB filters? 

    I feel like the OOB should cover your requirement, see if this article helps: Entity List filters for Power Apps Portals - Ulrikke Akerbæk (akerbak.com)

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard >