• About
  • Advertise
  • Privacy & Policy
  • Contact
THE DYNAMICS GUIDE
Advertisement
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
    • Home – Layout 6
  • News

    Trending Tags

  • Tech
    The Saturday Post

    The Saturday Post

    Trending Tags

  • Tutorials
    • All
    • Power Apps
    • Power Automate

    Get Started with Power Apps – Create your first Solution and Publisher

    Build a Power Automate flow using AI Builder to read information from a drivers licence

    Build a Power Automate flow using AI Builder to read information from a drivers licence

    Trigger a Power Automate flow from a button in a model-driven app

    Trigger a Power Automate flow from a button in a model-driven app

    Modern commanding how to start

    How to access modern commanding in a model driven app using Power Apps

    Computer and coffee

    Modern commanding in model driven app

  • Lifestyle
    • All
    • Exercise
    • Food
    • Health
    • Sleep
    Do not miss the train to Sleep – Go to bed early

    Do not miss the train to Sleep – Go to bed early

    Do you have to climb mountains to get fit?

    Exercise matters – make it your everyday routine

    Sleep is a key to good health

    What is real food?

    Trending Tags

  • Review
No Result
View All Result
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
    • Home – Layout 6
  • News

    Trending Tags

  • Tech
    The Saturday Post

    The Saturday Post

    Trending Tags

  • Tutorials
    • All
    • Power Apps
    • Power Automate

    Get Started with Power Apps – Create your first Solution and Publisher

    Build a Power Automate flow using AI Builder to read information from a drivers licence

    Build a Power Automate flow using AI Builder to read information from a drivers licence

    Trigger a Power Automate flow from a button in a model-driven app

    Trigger a Power Automate flow from a button in a model-driven app

    Modern commanding how to start

    How to access modern commanding in a model driven app using Power Apps

    Computer and coffee

    Modern commanding in model driven app

  • Lifestyle
    • All
    • Exercise
    • Food
    • Health
    • Sleep
    Do not miss the train to Sleep – Go to bed early

    Do not miss the train to Sleep – Go to bed early

    Do you have to climb mountains to get fit?

    Exercise matters – make it your everyday routine

    Sleep is a key to good health

    What is real food?

    Trending Tags

  • Review
No Result
View All Result
THE DYNAMICS GUIDE
No Result
View All Result
Home Tutorials Power Apps

How to access modern commanding in a model driven app using Power Apps

The Dynamics Guide by The Dynamics Guide
January 6, 2025
in Power Apps, Tutorials
Modern commanding how to start

Screenshot

0
SHARES
4
VIEWS
Share on FacebookShare on Twitter

How to access modern commanding in a model driven app using Power Apps

Using Power Fx with modern commanding in a model-driven app provides a powerful and straightforward approach to creating and managing custom commands without delving into complex JavaScript or the need of using the Xrmtoolbox and the Ribbon Workbench.

Power Fx allows you to write expressions that execute when a command is triggered, similar to formula expressions in Excel. Here’s how to use Power Fx for modern commanding in a model-driven app on the Accounts Main form.

Step 1: Open Your App in Power Apps Studio

  1. Log into make.powerplatform:
  2. Choose Your Environment: Ensure that you are working within the correct environment.
Select environment
  1. Find your solution Navigate to Solutions in the left menu. Open the solution where you app is located.
  2. Open Your Model-Driven App: Select the model-driven app you want to modify.

Step 2: Add or Modify a Command

  1. Access Command Designer: In the model-driven app select Edit commandbar on the Account view in the sitemap. Select main form to add the command to the Account form
Edit the command bar

Step 3: Use Command Designer for Power Fx

  1. Create a New Command or Edit an Existing One: Open the command designer and either create a new command or select an existing command to modify. If you want to create a new then in the top menu select New → Command. A new button with the text NewCommand is now added to the command bar.
Create a New Command
  1. Configure Command Properties:
    • Label: Set the user-facing name for the command.
    • Icon: Choose an icon to appear on the button.
    • Tooltip: Provide a brief description of what the command does.
  2. Assign Power Fx Expression:
    • Action Type: Choose “Power Fx” as the action type for this command.
    • Enter Power Fx: Write your Power Fx formula in the provided field. This could involve navigating to another page, setting a field value, creating a new record, or more complex logic.
    • Example of Power Fx action: Notify('Hi there')To print a text message at the top of the screen.
Print a text to the screen with Power Fx Notify()

Step 4: Define Visibility and Enablement Rules (Optional)

  1. Visibility Rules: Use Power Fx to define conditions under which the button should be shown. For example, you might only show a button if certain field values meet specific criteria.
  2. Enablement Rules: Similarly, you can set conditions that determine when the command is enabled or disabled based on data context or user roles.

Step 5: Save, Validate, and Publish

  1. Save Your Command: After configuring the command with Power Fx, save the changes in the command designer.
  2. Publish Changes: Ensure all changes are published so that they reflect in the app. You need to publish both in the command designer and in the component library.
  3. Test the Command: It’s crucial to test the new or modified command in the app to ensure that the Power Fx formula behaves as expected.
  4. Component library missing If you get this error when trying to play the app Open the components library, button in top menu and click publish. This will add a component library to the solution. When you later want to make changes to the command library you can access it directly from the solution.
Error message when the component library is not published
Publish the component library

5. What it will look like when the user clicks on the “Say Hi” button.

The message that is displayed when the button is clicked.

Example of another Common Power Fx Command usage

To provide a clear example, if you wanted to create a command that opens a new contact form when clicked, your Power Fx command might look like this:

Navigate(NewForm, 'Contacts')

This formula would instruct the app to navigate to a new form for creating contacts.

By using Power Fx in modern commanding, you can significantly streamline the process of adding dynamic behavior to your model-driven app’s UI, making it easier to manage and more intuitive for users. This approach allows for rapid development and deployment of new features within your apps.

Das war das!

Previous Post

Modern commanding in model driven app

Next Post

Trigger a Power Automate flow from a button in a model-driven app

The Dynamics Guide

The Dynamics Guide

Nulla et nisl lacus. Phasellus arcu lorem, accumsan eu luctus dignissim, egestas eu augue. Fusce ullamcorper nibh non pulvinar interdum. Donec eu sem id velit elementum convallis. Quisque ac sapien id purus egestas lobortis. Nullam id lacus eu ex consequat condimentum in nec sapien. Phasellus sollicitudin mattis gravida. Nulla sed gravida dui. Nunc tincidunt aliquam libero vitae iaculis. Nulla aliquet maximus mauris, sed gravida leo vulputate in. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;

Next Post
Trigger a Power Automate flow from a button in a model-driven app

Trigger a Power Automate flow from a button in a model-driven app

Stay Connected test

  • 23.9k Followers
  • 99 Subscribers
  • Trending
  • Comments
  • Latest

Do you have to climb mountains to get fit?

April 5, 2025
The new post

The new post

March 26, 2025
The Saturday Post

The Saturday Post

December 31, 2024

Get Started with Power Apps – Create your first Solution and Publisher

January 6, 2025

Hello world!

1

Do you have to climb mountains to get fit?

0

Exercise matters – make it your everyday routine

0

Sleep is a key to good health

0
Do not miss the train to Sleep – Go to bed early

Do not miss the train to Sleep – Go to bed early

March 31, 2025
The Saturday Post

The Saturday Post

December 31, 2024
The new post

The new post

March 26, 2025

Hello world!

November 28, 2024

Recent News

Do not miss the train to Sleep – Go to bed early

Do not miss the train to Sleep – Go to bed early

March 31, 2025
The Saturday Post

The Saturday Post

December 31, 2024
The new post

The new post

March 26, 2025

Hello world!

November 28, 2024
The Dynamics Guide

Step-by-step guides and tutorials. A place to learn

Follow Us

Browse by Category

  • Blog
  • Exercise
  • Food
  • Health
  • Lifestyle
  • Power Apps
  • Power Automate
  • Sleep
  • Tech
  • Tutorials

Recent News

Do not miss the train to Sleep – Go to bed early

Do not miss the train to Sleep – Go to bed early

March 31, 2025
The Saturday Post

The Saturday Post

December 31, 2024
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2024 The Dynamics Guide - Step-by-step guides and tutorials

No Result
View All Result
  • Tutorials
    • Power Apps
    • Power Automate
  • Lifestyle
    • Food
    • Exercise
    • Health
    • Joy
    • Sleep
    • Purpose
  • Review

© 2024 The Dynamics Guide - Step-by-step guides and tutorials