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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps equation re...
Power Apps
Unanswered

Power Apps equation referencing a lookup field in a Dataverse table

(0) ShareShare
ReportReport
Posted on by 6

I'm working on a Canvas App to track client interactions and contacts, and my main data sources are Dataverse tables.  My home screen has a gallery on it that shows all the meetings from all clients, and I want to be able to filter this gallery by client name.  The issue I'm having is that no matter how I try it, I can't reference the field anywhere in the gallery associated with the client/project name.  I'm thinking it may be because that field is a Lookup field in my Dataverse table, but I'm not sure how to circumvent that.

gnorman_2-1686583224816.pnggnorman_1-1686583205012.png

Is there a way within my canvas app gallery to reference that field? Or have I set up that field incorrectly?

 

 

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @gnorman ,

     

    Add a period/full stop after 'Project Name' (your Lookup column) to return fields from the related table.

     

    Amik_0-1686600045695.png

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

  • gnorman Profile Picture
    6 on at

    Thank you, that worked for displaying the data within that field within the gallery.

     

    Now, what I'm trying to figure out is how to use that field as a filter/search field within the gallery.  I've tried using a dropdown control:

    gnorman_1-1686601764538.png

    But I couldn't get the drop down to populate using the entries in that field.

     

    So, I tried using a search box and a search equation within the gallery:

    gnorman_2-1686601852428.png

    and this didn't work either.  Now, in this one, when I was typing the equation, I was prompted to use the schema/logical name for the field:

    gnorman_3-1686602075662.png

    Again, with any of the other fields from this table, this works but I'm struggling with the Project Name field.

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @gnorman,

     

    To Filter a Gallery using a related Dataverse column on a many-to-one relationship:

     

    1. Create either a Combo Box control or Dropdown control and set the Items property to the Client table.

    2. Select the Field you want to see using the Combo Box properties pane and disable Allow multiple selections

     

    Amik_0-1686607925322.png

     

    3. For the Gallery, apply the following expression. Note the expression is the same for either a Dropdown control or a Combo Box control:

     

     

     

    Filter(
     Meetings,
     'Project Name'.'Client Name' = Your_ComboBox.Selected.'Client Name'
    )

     

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

     

  • gnorman Profile Picture
    6 on at

    This worked, thank you.  I have one additional question: Is there any way you know of to create an "all" option for a drop-down control?  I know with a combo box I can just add all the members of a particular field, but if I have 100 clients that could get tedious.  I tried using an If equation in conjunction with the Filter function, but I couldn't figure out how to add "all" or something simliar to the drop-down.

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    Hi @gnorman ,

     

    Yes this is possible with either a Combo Box control or a Dropdown control.

     

    For example, in the Items property of the Dropdown or Combo Box control, use:

     

    Sort(
     Ungroup(
     Table(
     {
     DropdownOptions: Distinct(
     'Your Data',
     'Your Field'
     )
     },
     {DropdownOptions: ["#All"]}
     ),
     "DropdownOptions"
     ),
     Value
    )

     

    In the Items property of your Gallery, use:

     

    Filter(
     'Your Data',
     //Dropdown1.SelectedText.Value = "#All" || 'Your Field' = Dropdown1.SelectedText.Value //use for a dropdown control
     ComboBox1.Selected.Value = "#All" || 'Your Field' = ComboBox1.Selected.Value //use for a combo box control
    )

     

    Given there are multiple Solutions to different questions in this thread, please mark them as Solved if they answered your questions. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard