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

Complex Gallery with two tables

I have two excel tables

 

Request(email, some_other_info)

and

Person(email, some_other_info)

 

There are two apps. One for everyone and one for admins. Request table is public and shared with everyone, Person table is private and shared only with admins

 

In App1 people create and manage requests.

In App2 admins manage request as well as Person table.

 

Here is what I have right now in App2:

To get all the district emails from Request table:

Distinct(Request,Email)

This gives me all emails.

In the gallery I have a hidden text label which I use to see if for this email Person exists.

HiddenLookup.Text property

If(IsBlank(LookUp(Person,ThisItem.Result = Email,Email)),true,false)

And then based on this hidden variable I either show info or that no user profile exists.

If(HiddenLookup.Text = "true","User Account Not setup",LookUp(Person,ThisItem.Result = Email,some_other_info))

 

Now, I want to have a gallery which only displays Distinct emails which do not appear in Person table.

What I though of putting in the Gallery Item property

 

Distinct(
    Filter(
        Request,
        IsBlank(LookUp(Person,Person.Email = Request.Email,Person.Email))
    ),
    Request.Email
)

This ofcourse does not work. How can I, in the formula, separate Email from Person table and Email for Request table?

Any ideas on how I could make this Gallery work, to display only distinct emails that are not found in Person table?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Complex Gallery with two tables

Hi @Anonymous,

 

You could write the formula in this way:

Distinct(
    Filter(
        Request,
        not(Email in Person.Email)
    ),
    Email
)

See my testing results:

31.PNG

 

Adding some reference here:

Operators and data types in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Complex Gallery with two tables

Hi @Anonymous,

 

You could write the formula in this way:

Distinct(
    Filter(
        Request,
        not(Email in Person.Email)
    ),
    Email
)

See my testing results:

31.PNG

 

Adding some reference here:

Operators and data types in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,720)