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 / Mutliple lookups with...
Power Apps
Suggested Answer

Mutliple lookups within an command bar button in powerfx

(1) ShareShare
ReportReport
Posted on by 19
HI there, 
I have this requirement that a button on the command bar needs to show when 
Entity : Consultant -> that's a has a lookup to Legal Entity (Entity) 
and then from within that lookup it has a lookup to Country 
and in Country we have this boolean value called Visible and I need the button to show from a boolean value. So if it is TRUE then the button show etc. 
 
I cannot seem to get it right at all and I am really struggling with it 
 
so far I have got this 
 
IF (!IsBlank(
   Lookup ( Users, 'Full Name' = Self.Selected.Item.Consultant.'Full Name').Legal Entity), TRUE. FALSE. 
 
So this highlights the button if the full name within in the consultant is NOT BLANK. 
 
I am not really sure how far I can go with Self.Select.ITem.Consultant because I can go all the way to Self.Selected.Item.Consultant.'Legal Entity'.Country and I could do an IF on that but how would I check if the value Visible Boolean is equal to that ? Also I am not sure if it will go that far. 
 
Is there a way to chain the lookups so the value of one lookup and go onto the next lookup, because things like update context etc are not possible within PowerFX in the command bar. 
 
Any help would be much appreciated, please. 
 
 
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,834 Super User 2026 Season 1 on at
     

    It sounds like you're working with PowerFX in a Power Apps environment and trying to conditionally display a button based on a series of lookups. Let's break down the problem and see how we can chain these lookups to achieve the desired result.

    Problem Breakdown

    1. Entity: Consultant has a lookup to Legal Entity.
    2. Legal Entity has a lookup to Country.
    3. Country has a boolean field Visible.
    4. You need to show the button if Visible is TRUE.

    Solution Approach

    To achieve this, you need to chain the lookups and check the boolean value. PowerFX allows you to perform nested lookups, but it can get tricky. Here's a step-by-step approach:

    1. Lookup Consultant's Legal Entity:

      Lookup(Consultants, 'Full Name' = Self.Selected.Item.Consultant.'Full Name').LegalEntity

      2. Lookup Legal Entity's Country:

       

      Lookup(LegalEntities, 'Legal Entity' = Lookup(Consultants, 'Full Name' = Self.Selected.Item.Consultant.'Full Name').LegalEntity).Country

      3. Check Country's Visible Boolean:

      Lookup(Countries, 'Country' = Lookup(LegalEntities, 'Legal Entity' = Lookup(Consultants, 'Full Name' = Self.Selected.Item.Consultant.'Full Name').LegalEntity).Country).Visible

      Combined Formula

      You can combine these lookups into a single formula to check the Visible boolean and conditionally show the button:

      If(

       Lookup(Countries, 'Country' = Lookup(LegalEntities, 'Legal Entity' = Lookup(Consultants, 'Full Name' = Self.Selected.Item.Consultant.'Full Name').LegalEntity).Country).Visible,

          true,

          false

      )

      Explanation

      Lookup(Consultants, 'Full Name' = Self.Selected.Item.Consultant.'Full Name').LegalEntity: This gets the Legal Entity associated with the selected Consultant. Lookup(LegalEntities, 'Legal Entity' = ...).Country: This gets the Country associated with the Legal Entity. Lookup(Countries, 'Country' = ...).Visible: This checks the Visible boolean value in the Country entity.
       

      If the response is helpful to you, a like or mark as the correct solution. thank you so much!

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 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard