cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vermaaman
Resolver I
Resolver I

PowerApps Portal - Filter Table(Entity) list based on multiple columns in different entity lists

Hello,

 

I am pretty new with powerapps portals, please help.

 

There are two different Tables (Entities) and one PowerApps portal.

 

Tables Name:

1- Request register table

    Column (type Text) based on which i want to apply first filter = 'Responder Email' [Text]

2- User registration 

    Column (type choice) based on which i want to apply second filter = 'Roles' [Choices]

Table from which i want to pull the record after filtering is "Request register table" and this table has been added on powerApps portal.

 

Is there any way i can filter the records of based on above condition using javascript or any other way. 

 

@filters @Powerappsportals

1 ACCEPTED SOLUTION

Accepted Solutions
vermaaman
Resolver I
Resolver I

Thanks everyone for the input, really appreciate that.

 

I end-up doing custom scripting for the same.

 

 

var roles = "{{ user.roles }}";
var userFullNames = "{{user.fullname}}";

var list = $(".entity-grid");
list.on("loaded", function () {
    if (!roles.toLowerCase().includes("administrator") && !roles.toLowerCase().includes("reviewer")) {
       list.find("table tbody > tr").each(function (index, tr) {
             
            var tdReq = $(tr).find('td[data-attribute="cr3962_requestorname"]');
            var tdResp = $(tr).find('td[data-attribute="cr3962_respondernametext"]');
            if (!userFullNames.toLowerCase().includes(tdReq.text().toLowerCase()) && !userFullNames.toLowerCase().includes(tdResp.text().toLowerCase())) {
               $(tdReq).parent().hide();
            }
        });
    }
});

 

 

View solution in original post

5 REPLIES 5
MarkBiggerstaf
Microsoft
Microsoft

Hi,

 

The request you are making is likely custom, so Microsoft cannot offer advice here.  However, we will leave this post available for community members to answer.

 

Thanks,

 

Mark Biggerstaff

Dynamics Support

vermaaman
Resolver I
Resolver I

@MarkBiggerstaf is there any way i can do this using OOB feature ? specially filtering the records based on role and status ?

 

Prakash4691
Solution Specialist
Solution Specialist

@vermaaman ,

 

Through OOB you can enable metadata filter in list. Attached reference link, have a look at List Filter configuration section.

https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/entity-lists#list-filter-configur...

 

 

Regards,

Prakash

neerajn
Power Apps
Power Apps

Hi @vermaaman , did you try fetchXML liquid tag. You can build complex filter condition using this tag and render as table (custom JS/HTML). 

 

https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/template-tags

 

vermaaman
Resolver I
Resolver I

Thanks everyone for the input, really appreciate that.

 

I end-up doing custom scripting for the same.

 

 

var roles = "{{ user.roles }}";
var userFullNames = "{{user.fullname}}";

var list = $(".entity-grid");
list.on("loaded", function () {
    if (!roles.toLowerCase().includes("administrator") && !roles.toLowerCase().includes("reviewer")) {
       list.find("table tbody > tr").each(function (index, tr) {
             
            var tdReq = $(tr).find('td[data-attribute="cr3962_requestorname"]');
            var tdResp = $(tr).find('td[data-attribute="cr3962_respondernametext"]');
            if (!userFullNames.toLowerCase().includes(tdReq.text().toLowerCase()) && !userFullNames.toLowerCase().includes(tdResp.text().toLowerCase())) {
               $(tdReq).parent().hide();
            }
        });
    }
});

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,310)