Skip to main content
Community site session details

Community site session details

Session Id : MXDtsM5wOWsY+G6hzOrObL
Power Apps - Microsoft Dataverse
Unanswered

Dropdown control where value is a lookup column (relationship column)

Like (0) ShareShare
ReportReport
Posted on 28 Jun 2021 12:08:21 by

Hello

 

I am currently trying my hand out building some power apps but have run into a bit of a problem I am not sure how to solve.

 

I am using the Microsoft dataverse to store the data

I have 2 data tables:

 

users table: contains a first name, last name, company (lookup to the company table) etc.

Company table: contains, company name, Managing director (this is a user, so lookup to the user table), reporting responsible (is also a user, so lookup to the user table)

 

Let's say i have a gallery showing the companies in the company table, i now want to filter that based on who they have assigned as Managing director. I would like to do this from a dropdown, but I can't make it so that my choices is a list of users that are assigned as managing directors in the company table.

 

If i use the Company table as the "items" in the dropdown control, I can't select Managing director as the "value" as it is basically a record of a lot of data (I would think i could use the unique identifier and the return the requested value).

 

If I use the Users Table as the "Item" in the drowdown I can't seem to filter it so it shows only those users that have been assigned as a managing director in the Companies table.

I am not sure if i should somehow join the 2 tables as 1 collection first, or what the intended way to go about this is. If anyone can tell me how to go about this i would really appreciate it.

Thank you in advance

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on 23 Aug 2021 at 09:08:44
    Re: Dropdown control where value is a lookup column (relationship column)

    Hi @Anonymous, did you get this resolved yet? If not, it's possible, see below example. Have drop down that is mapped to the Company table and filter the Items property of the gallery control of users:

    Filter(Accounts, 'Owning User'.User = Dropdown1.Selected.User)

    Note: using Accounts instead of Users and out-of-the-box Users instead of Company

     

    EricRegnier_0-1629709595124.png

     

  • Community Power Platform Member Profile Picture
    on 29 Jun 2021 at 08:56:47
    Re: Dropdown control where value is a lookup column (relationship column)

    Hi @EricRegnier 

    I think the problem I am running into is that the galleries director is a complex column. So i want to filter the gallery based on the GUID of the MD.

     

    I did a quick mockup in excel, but as you can see, i want to sort the gallary on the company table, based on the director id, and i want the dropdown to show a list of users who have been assigned as directors in the company table. So the dropdown should only contain id 1 and 2, not 3 and 4, as they are not assigned as directors in the company table.

    Mikkel_0-1624956794040.png

     

    If it was excel I would just make a lookup based on the director id, and filter that column. Not quite sure how to do that in powerapps though.

     

    I hope this helps explain, and I am not sure if this is something you would normally do in powerapps.

     

    Thank you in advance

     

     

     

  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on 29 Jun 2021 at 06:41:03
    Re: Dropdown control where value is a lookup column (relationship column)

    Hi @Anonymous,

    The retrieve the related records whether you want to retrieve the related companies based on a User or the Users based on the company you can filter directly in the Filter expression.  Example:

    Filter(Companies, Director = Gallery1.Selected)
    //or
    Filter(Users, Company = Gallery1.Selected)

     More on filter: https://docs.microsoft.com/powerapps/maker/canvas-apps/functions/function-filter-lookup 

    Hope this 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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Featured topics

Loading complete