web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : GxG06EJmr87FhHcNs0tmfN
Power Apps - Microsoft Dataverse
Unanswered

Query 2 Tables and Get Results

Like (0) ShareShare
ReportReport
Posted on 7 Sep 2021 13:49:20 by 34

Hello,

 

One doubts over here. I am using 2 data verse table.

 

1.Vendor Table

Current ApproverNext Approver
12
23

 

2. Approver Table

LevelApprover Email
2abc@outlook.com
3xyz@outlook.com

 

Here, keep some points in mind.

NextApprover = CurrentLoginUser/User()

 

So I want to filter records based on current login user in my gallery[datasource I am using for gallery is vendor table].

 

How can I achieve this functionality using this 2 tables?

 

Thanks in Advance!

 

  • CH-24102312-0 Profile Picture
    on 08 Sep 2021 at 11:30:59
    Re: Query 2 Tables and Get Results

    Hi @__Bansari 

     

    It's preferable to have relationships between tables and usually with good database design this can be achieved, but if that is not possible, then you can assign records in the first table to variables and then use those variables as part of a Lookup function to the seond table

     

    Here is my recent blog post that explains how to do this: https://hiredgun.tech/assigning-dataverse-records-to-variables/

  • __Bansari Profile Picture
    34 on 08 Sep 2021 at 09:26:00
    Re: Query 2 Tables and Get Results

    @ChrisHarper Thank you for your time.

     

    But we can not make next approver as a lookup column. Next Approver field value update automatically based on previous approver approval.

     

     

  • CH-24102312-0 Profile Picture
    on 07 Sep 2021 at 13:58:58
    Re: Query 2 Tables and Get Results

    Hi @__Bansari 

     

    Have you created any relationships between the 2 dataverse tables?

     

    Making the 'Vendor Table'.'Next Approver' column a Lookup column (many to one relationship) to the Approver table will make filtering straightforward

     

    Once you have the relationship, to get the Email address you would use:

    Filter(Vendor,'Next Approver'=User()).'Approver Email'

     

    I hope that helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics