cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to filter the Contact Entity Records if linking is done in another entity lookup field in Canvas app Gallery

Hi Experts,

 

I have 300 records in Contact entity and there is another entity called "Population master" where I have Contact_Lookup field by which I can linking the population master with Contact Entity.

But in my canvas App, I am trying to build two-screen wherein

1st screen will display all contacts whose linking is done i.e in Contact_Lookup  of population master entity have records of contact.\

2nd screen will display all the contacts whose linking with population master is not done yet.

 

I have tried creating calculated fields (and use it in canvas app for filtering the record) which will flag as 1 if Contact_Lookup field of population master entity contain data else 0. but it is not working as expected. It is not showing 1 even if the linking is done for the contact.

 

Any help with this requirement will be appreciable.

 

Thanks,

Amit

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous ,

 

Please try to put the following formula to OnVisible property of first screen.

ClearCollect(Col1,AddColumns('Population Master',"NewColumn",'Contact_Lookup'.Contact).NewColumn);

Set the Items property of linked gallery:

Filter(Contacts,Contact in Col1)

Set the OnVisible property of the second screen:

ClearCollect(Col2,Contacts.Contact);ClearCollect(Col3,RemoveIf(Col2,Contact in Col1))

 

 Set the Items property of Unlinked gallery:

Filter(Contacts,Contact in Col3)

Snipaste_2020-07-10_16-11-02.png

Hope this helps.

Sik

View solution in original post

15 REPLIES 15
eka24
Super User III
Super User III

Try:

Filter(Population,Not(GUID in Contact.GUID))

 

Or

Filter(Contact,Not(GUID in Population.GUID))

 

You can show Sample tables and what you expect if the above does not work

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

Hi @eka24 

I have tried your solution but it seems not working and also getting delegation Warning. Please find below screenshot:

Contact Filter Issue in Canvas AppContact Filter Issue in Canvas App

 

Here, 'Population Masters'.'Population Master' is the GUID field in Population Master and Contact is a GUID field of Contacts Entity.

Text Input I am using to filter the Gallery data.

Please help me with this.

 

Thanks,

Amit

The solution i gave is different from what you have done. did you try it and how was it.

Again i said if you have issues, show your tables so we proceed from there.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

Hi @eka24 

 

Please find the attached Excel with my Entity dummy records and how they are. And what exactly my requirement is.

Thanks,

Amit

Anonymous
Not applicable

Hi @eka24 

Any Help on this?

 

Thanks,

Amit

Established:

Filter(Population,Contact_Lookup in Contacts.'Full Name')
 
Not Establised
Filter(Population,Not(Contact_Lookup in Contacts.'Full Name'))
 
In.JPG
Not.JPG
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @Anonymous ,

 

Please try to put the following formula to OnVisible property of first screen.

ClearCollect(Col1,AddColumns('Population Master',"NewColumn",'Contact_Lookup'.Contact).NewColumn);

Set the Items property of linked gallery:

Filter(Contacts,Contact in Col1)

Set the OnVisible property of the second screen:

ClearCollect(Col2,Contacts.Contact);ClearCollect(Col3,RemoveIf(Col2,Contact in Col1))

 

 Set the Items property of Unlinked gallery:

Filter(Contacts,Contact in Col3)

Snipaste_2020-07-10_16-11-02.png

Hope this helps.

Sik

View solution in original post

Anonymous
Not applicable

Hi @eka24 

 

Thanks for your response!

As per your formula and screenshot, you are filtering the population entity but I want to filter the contacts Entity. And based on the filter below records should display:

 

Contact Link Canvas App ReqContact Link Canvas App Req

 

Could you please help me with this? Because I can filter the population entity on the basis of established or not- established. but facing issues with filtering contacts entity.

 

Thanks,

Amit

Filter(Contacts,'Full Name' in Population.Contact_Lookup)
Filter(Contacts,Not('Full Name' in Population.Contact_Lookup))
 
Not established.JPG
 
 
established.JPG
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,313)