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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Filter list depending ...
Power Pages
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:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,455 Most Valuable Professional on at

    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)

     

  • MartinVargas Profile Picture
    312 on at

    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,455 Most Valuable Professional on at

    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

    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,455 Most Valuable Professional on at

    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 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 53

#2
DP_Prabh Profile Picture

DP_Prabh 40

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 28 Most Valuable Professional

Last 30 days Overall leaderboard