cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Highlighted

Hi @AmitSah ,

 

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
Highlighted
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.

Highlighted

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

Highlighted

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.

Highlighted

Hi @eka24 

 

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

Thanks,

Amit

Highlighted

Hi @eka24 

Any Help on this?

 

Thanks,

Amit

Highlighted

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.
Highlighted

Hi @AmitSah ,

 

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

Highlighted

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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,826)