cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
v-micsh-msft
Community Support
Community Support

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
v-micsh-msft
Community Support
Community Support

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (57,377)