• 2 Responses

    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.

    https://nebulaaitsolutions.com/add-ribbon-buttons-and-edit-command-bar-within-power-apps-dynamics-365/

    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.

  • Subscribe
    Notify of
    guest
    2 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    Tom
    Tom
    1 year ago

    Thank you, this was very helpful 🙂

    shahryar sultan
    11 months ago

    What if we want to use our custom status field. Because the custom status field is not appearing in the intellicense?

WANT QUICK D365 IMPLEMENTATION?

Let started with our D365 Quickstart package and get onboard within 7 days!

I'M INTERESTED!
LATEST POSTS
© Copyright 2024 Nebulaa IT Solutions LLP. All Rights Reserved.
Download
Brochure