Skip to content
Aerie Woman Working Power BI

Solving the Modern Command Button Visibility Issue in Power FX

Customizing ribbon commands in Dynamics 365 and Model apps extends their functionality significantly. By adding ribbon buttons, developers can enable users to perform various actions, such as initiating workflows, setting field values, launching custom pages or canvas apps, and triggering events through code. Depending on the requirements, ribbon commands range from simple to highly complex.

Introducing Power FX Ribbon Commands

Microsoft’s Power Apps platform, known for its low-code capabilities, introduced Power FX ribbon commands. These allow low-code developers to add buttons with minimal effort. Key features include:

  • Set Field Values: Buttons can set field values using the Power FX language.
  • Run JavaScript: Developers can execute JavaScript actions with Power FX ribbon commands.

However, when Power FX ribbon commands cannot meet a requirement, developers must rely on classic tools for more advanced customizations.

A Recent Challenge with Power FX Ribbon Commands

Recently, a solution engineer at Aerie faced an issue while using the Power FX ribbon command editor:

  • Scenario: The goal was to display a button only when a True/False field was marked "True." If the field was set to "True," users could interact with the ribbon command.
  • Easy Visibility Logic: Power FX made it simple to configure the button’s visibility based on the field value.
  • Problem: The button didn't display in real-time. After toggling the field to "True" and saving, the button wouldn’t appear unless the page was refreshed. This disrupted user workflows and caused confusion.

At Aerie, we focus on creating intuitive solutions that align with end-user workflows. Requiring users to refresh the page made the solution less seamless and harder to use.

Limitations of Power FX Ribbon Commands

Power FX ribbon commands are convenient for basic tasks but limited in meeting more complex business needs. Common limitations include:

  • Real-Time Updates: They don’t always update visibility in real time when a record changes.
  • Role-Based Visibility: They lack the ability to hide or show buttons based on user roles.
  • Advanced Custom Logic: They cannot leverage JavaScript for conditional visibility rules.

The Solution

To overcome these limitations, Aerie's development team turned to classic customization methods:

Classic Ribbon Commands: Developers recreated the button, visibility rules, and required functionality using classic XML-based ribbon command customizations.
Ribbon Workbench Tool: Ribbon Workbench, a tool designed to simplify manual XML data editing, was used to manage these customizations.
  • Display Rules: The team set simple display rules—for example, showing the button only when the field in question was "True."
  • JavaScript Integration: Complex conditional visibility logic was handled using JavaScript.

Bridging the Gap Between Low-Code and Pro-Code

This effort reflects the diversity of Microsoft’s Power Platform:

  • For Citizen Developers: Power FX simplifies basic functionality.
  • For Pro-Code Developers: Complex scenarios can still be handled by advanced coding and tools like Ribbon Workbench.

Microsoft continues to enhance its low-code tools, but for now, professional developers play a vital role in filling feature gaps.

Aerie's Commitment to Seamless Solutions

At Aerie, we take pride in addressing technical challenges by providing efficient and robust solutions. This fix not only underscores the flexibility of the Power Platform but also highlights our commitment to making applications intuitive and user-friendly.

If you’re facing similar challenges with workflow optimization or application functionality, we’re here to help. Reach out today to learn how Aerie’s expertise can enhance your operations.

Tackling challenges, delivering solutions—that’s Aerie.

Share
  
DON'T MISS!

Expert Insights from the Aerie Team

Drop us a line

Our team will be happy to answer your questions.

ADDRESS: 110 West Canal Street, Suite 201
Winooski, VT 05404

PHONE
: (813) 358-4656
HOURS: 8:00 am - 5:00 pm EST Monday to Friday
EMAIL: chanson@aerieconsulting.com