cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cheang
Frequent Visitor

Show/Hide button using Ribbon Workbench

Hi,

 

I want to show/hide ribbon button with a Contain condition. 

 

For example:

 

There are three people email in a text field. The button will visible/invisible based on logged in user email in the text field. 

 

I think that the security role is not suitable to do because of the email(s) in the text field is dynamic not static. 

 

Any suggestion on this? 

 

 

 

3 REPLIES 3
cchannon
Super User
Super User

Yes. Don't use the Ribbon Workbench.

 

Instead, use Commands, and write a PowerFX command to evaluate your condition. You can get the current user's email address in PowerFX commands with 

User().Email

User function in PowerFX 

Using PowerFX in Commands

a33ik
MVP

Hello,

I would recommend using Custom Rule with JavaScript. Check this as an example - https://www.drware.com/show-custom-ribbon-button-based-on-security-role-of-the-logged-in-user-in-dyn...

I don't think is workable. The User() function is not supported.  I try to print out the user email using function Confrim Titlebut there are nothing show up. 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,975)