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 button vis...
Power Apps
Unanswered

Command bar button visibility with choice

(1) ShareShare
ReportReport
Posted on by 57

Hello, first of all sorry for duplicating posts, I posted it first on "Building Power Apps" and I was told this will be a better suited place:

 

I've been trying to make a a couple of buttons on the command shown or hidden abased on a choice (A or B)  with PowerFX 

 

First button I have the formula: 

Visible: Self.Selected.Item.'Field' = 'Field'.A
Arcadi_1-1635608757771.png

 

Second one:
Visible: Self.Selected.Item.'Field' = 'Field'.B
Arcadi_0-1635608720763.png
 
But I always get both shown, no matter the value of the choice:
Arcadi_2-1635608930070.png

I've tried to publish and republish the solution, create new buttons, regenerate the ribbon and try another browser... I'm either doing a silly mistake (I just learned how to use Power FX and to edit buttons directly from the UI) or this is a bug. 

 

It's not a problem that blocks me, I can use other fields to get the same effect.

 

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,714 Super User 2026 Season 1 on at

    Hello @Arcadi

     

    That was strange what you have done is perfectly correct. Give a try

    Visible: Self.Selected.Item.'Field' = 'Field'.A // Pass Value directly and check

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • Arcadi Profile Picture
    57 on at

    Thanks for the answer @rampprakash , I don't understand what you mean, isn't your formula the same as mine? 

    I've done some more experiments and the choices work on actions but not on hide/show

     

    Notify(if(Self.Selected.Item.'Field' = 'Choice'.A,"A","B"))

     

    My work around is to have a new field of type int that changes with business rules and then:

     

    Self.Selected.Item.'Field_numeral' = 1

  • sujathayuvaraj@cbe Profile Picture
    Microsoft Employee on at

    Really helpmed me 

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