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 / Command Bar Visibility
Power Apps
Answered

Command Bar Visibility

(0) ShareShare
ReportReport
Posted on by 15

I need to hide a command bar button when related records exist. For example, one parent cash flow can have multiple child cash flows. If a parent cash flow has at least one child cash flow, the button should be hidden.

this is a command bar on a model driven app MAIN FORM  trying to use the Powerfx formula to hide the visibility.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at
    What command button are you referring to - a screenshot would be very helpful here.
  • JJ-27101724-0 Profile Picture
    15 on at
    @WarrenBelz , here is more context . I have a command bar that creates related records but i need to hide the button once the related records are created. 
  • WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at
    It is good to post more detail on initial posts (I see you have now updated it) as it may (and has in this case) affect who may respond. I do not use MDAs, so will leave this for someone who does to try to help you.
  • Suggested answer
    stum Profile Picture
    144 on at
    Hi,
     
    I don't know how is your parent-child relationship setup but you can use this.
     
    CountRows(
        Self.Selected.Item.'Child Cash Flows'  // Use the relationship name (1:N navigation property)
    ) = 0
     
    Replace 'Child Cash Flows' with the exact relationship name. This directly accesses the related records collection on the current record (Self.Selected.Item).
  • Verified answer
    Kalathiya Profile Picture
    1,690 Super User 2026 Season 1 on at
    Hello @JJ-27101724-0
     
    You can do this using the modern command bar (Power Fx) on the Main Form of Parent table.
     
    IsEmpty(
        Filter(
            Courses,
            Professor.Professor = Self.Selected.Item.Professor
        )
    )
    
    
    
    Note: 

    Please replace the table and column names with your table.

    In the example above, Courses is the child table. The child table contains a Professor lookup column, and this Power Fx formula is implemented on the Professor main form, which is the parent table.

     
     
    Output: 
    No courses added then i can see "NewCommand" button. 
        
     

    📩 Need more help? Mention@Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping

     

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