cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tiagodanielff
New Member

Filter values on consecutive fields within the same Entity Form - PowerApps Portal

Hello,

 

I need to filter the values of consecutive fields in the same entity form created on PowerApps Portal as follows:

I have a field called Customer which allows me to select amongst the list of my existing customers (working fine).

Then I have a second field called Contracts, which lists all existing contracts. I would like only to display the Contracts assigned to the Customer previously selected. How to achieve this?

 

I'm still getting introduced to PowerApps Portals and CDM...

 

Thanks in advance and Best Regards,

 

TC

1 ACCEPTED SOLUTION

Accepted Solutions
OOlashyn
Super User
Super User

Hi @tiagodanielff ,

 

Do you want to perform filtering when you create a record or when you edit a record?

 

If you want to make filtering on creation you can check up my blog post where I describe how can you filter lookups dynamically. It requires some knowledge about JavaScript and liquid.

 

If you want to filter lookup when you edit an record it is much easier - go to your CDS form, open it in an editor, switch to classic mode ( by clicking "Switch to classic" button), find your dependant field and open it properties (either by double-clicking on it or by selecting field and pressing Change Properties button on top). In a Display tab scroll to the section called Related Records Filtering. There you can define by which field you would like to filter too.

For example, I have an entity called Categorization. This entity has a field called Parent - which is a lookup to another categorization. On the Contact entity, I have two fields - Primary Categorization and Secondary Categorization - both are lookups to Categorization entity. When users select Primary Categorization I would like to show only Secondary Categorization that contains selected Primary as a Parent. You can see my filter condition in the attached screenshot.

 

Hope this will help.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

2 REPLIES 2
OOlashyn
Super User
Super User

Hi @tiagodanielff ,

 

Do you want to perform filtering when you create a record or when you edit a record?

 

If you want to make filtering on creation you can check up my blog post where I describe how can you filter lookups dynamically. It requires some knowledge about JavaScript and liquid.

 

If you want to filter lookup when you edit an record it is much easier - go to your CDS form, open it in an editor, switch to classic mode ( by clicking "Switch to classic" button), find your dependant field and open it properties (either by double-clicking on it or by selecting field and pressing Change Properties button on top). In a Display tab scroll to the section called Related Records Filtering. There you can define by which field you would like to filter too.

For example, I have an entity called Categorization. This entity has a field called Parent - which is a lookup to another categorization. On the Contact entity, I have two fields - Primary Categorization and Secondary Categorization - both are lookups to Categorization entity. When users select Primary Categorization I would like to show only Secondary Categorization that contains selected Primary as a Parent. You can see my filter condition in the attached screenshot.

 

Hope this will help.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

Many thanks @OOlashyn .

 

In fact, I wanted to edit the form and get the filters up there. Although, I didn't know that I would have to use the "Switch to Classic". Your solution has solved my problem.

 

Thanks and Best Regards,

 

Tiago Carvalho

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,386)