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 / Filtered Lookup Modal ...
Power Pages
Unanswered

Filtered Lookup Modal keeps Empty paginated Pages

(0) ShareShare
ReportReport
Posted on by

I have used JS to create cascading filter from one lookup selection to another. However, after filtering the results keep the paginated pages and returns empty pages. Only the page that has results will show.

I have also turned off pagination by increasing the page size (2000), but this causes very long load times as all data needs to be filtered and then returned. 

 

Is there a way to remove empty pages, move the results to page one, or improve the load time of no pagination?

 

 

 

var selectedProject;
var selectedProjectId;

$(document).ready(function() {
 $("#yourproject").change(onPrimaryChange);
 $("#yourproject").change();
});

function onPrimaryChange() {
 let list = $("#yourcompany_lookupmodal")
 .find(".entity-lookup")
 .find(".entity-grid")
 .eq(0);

 let list2 = $("#yourproject_lookupmodal")
 .find(".entity-lookup")
 .find(".entity-grid")
 .eq(0);

 // Find the selected row
 var selectedCompany = list2.find("table tbody > tr.selected");

 // Get the value of the desired column
 selectedProject = selectedCompany.find('td[data-attribute="replica_id"]').attr("data-value");
 selectedProjectId = selectedCompany.find('td[data-attribute="Id"]').attr("data-value");

localStorage.setItem("selectedProjectId", selectedProjectId);

 list.on("loaded", function() {
 var projectid = selectedProject;
 console.log("projectid : " + projectid);
 list.find("table tbody > tr").each(function() {
 var tr = $(this);
 var projectidOnly = $(tr).find('td[data-attribute="projectid"]').attr("data-value");
 if (projectidOnly != projectid) {
 tr.remove();
 }
 });
 });

}

 

 

 

 
Categories:
I have the same question (0)
  • HiroakiSasaki Profile Picture
    73 on at

    I'm facing with the exactly same issue.

     

    @zuccidevs If you got a solution or workaround by now, I'd appreciate you sharing it here as a solution.

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 61

#2
Valantis Profile Picture

Valantis 46

#2
11manish Profile Picture

11manish 46

Last 30 days Overall leaderboard