knowledgecenter-breadcrum

Knowledge Center

30 May, 2022

How to show or hide ribbon buttons using Power Fx formula?

Posted on 30 May, 2022 by Admin, Posted in Dynamics 365 , Power Apps , Dataverse , Power Platform , Dynamics-365 Sales

How to show or hide ribbon buttons using Power Fx formula? Blogs

How to show or hide ribbon buttons using Power Fx formula?

Introduction

I recently found out that we can add or edit ribbon buttons/command bar in PowerApps itself.

Add Ribbon Buttons and Edit Command Bar within Power Apps – Dynamics 365
<iframe class="wp-embedded-content" data-secret="HPQ4nI2OxE" frameborder="0" height="338" marginheight="0" marginwidth="0" sandbox="allow-scripts" scrolling="no" security="restricted" src="https://nebulaaitsolutions.com/add-ribbon-buttons-and-edit-command-bar-within-power-apps-dynamics-365/embed/#?secret=HPQ4nI2OxE" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" title="“Add Ribbon Buttons and Edit Command Bar within Power Apps – Dynamics 365” — Nebulaa IT Solutions" width="600"></iframe>

I had the habit of customizing ribbon buttons using ribbon workbench, but this time I thought of doing it in PowerApps itself.

I found out that in PowerApps we have to use Power Fx formula for determining the visibility of ribbon buttons.

Solution

After a bit of research I could build this formula.

If(Self.Selected.Item.Status = ‘Status (Marketing Requests)’.Active, true, false)

Example

I have created two buttons ‘Approve‘ and ‘Reject‘ which will be hidden when the status of the record is Inactive.

Click on the button and a command panel will open in left hand side.

Scroll down in the command panel until you find ‘Visibility‘ option and select ‘show on condition formula‘. Add this formula in the textbox which has fx as a label and then click on ‘Save and Publish

If(Self.Selected.Item.Status = ‘Status (Marketing Requests)’.Active, true, false)

After publishing we can see that the buttons are not visible when the record is inactive.

Comment

Loading

Recent Updates

Thumbnail D365 for Marketing
Blogs
16 Dec, 2024

10 Reasons Why You Need Dynamics 365 for Marketing

This blog discusses the top 10 reasons to choose Dynamics 365 for Marketing to improve your business's marketing efforts.  …

READ MORE
Thumbnail_top 10 benefits of
Blogs
02 Dec, 2024

Top 10 Benefits of Microsoft Dynamics 365

This blog lists the advantages of Microsoft Dynamics 365, focusing on how it can improve your business operations.    …

READ MORE
Thumbnail_Microsoft365 Vs D365
Blogs
12 Nov, 2024

Microsoft 365 vs Dynamics 365

This blog will help you understand the key difference between Microsoft 365 and Dynamics 365, so you can make an…

READ MORE