• 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

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

The Dynamics Guide by The Dynamics Guide
January 6, 2025
in Power Apps, Power Automate, Tutorials
Trigger a Power Automate flow from a button in a model-driven app

Screenshot

0
SHARES
3
VIEWS
Share on FacebookShare on Twitter

Modern commanding in model-driven app and Power Automate

This step-by-step guide illustrates how to integrate a Power Automate flow with a model-driven app in Power Platform, utilizing modern commanding. By following these instructions, you’ll establish a streamlined process where a specific action, such as clicking a button, initiates a flow within your application.

Step by step

1. Create a Date Column Trigger

Begin by creating a date column within your app’s data model. This column will serve as the trigger for the Power Automate flow when it’s set.

  1. Add the new column to the form so it will be available to Power FX. Make sure it is locked. It should be set by the system not the user.
  2. Make sure the phone number field (or any field you want to make changes to) is also added to the form. This field will be formatted by the Power Automate flow when the button is clicked.

2. Configure the Power Automate Flow

You will create a flow that will format the phone number when the Format Phone Number button is clicked. The first action will be a When a row is added, modified or deleted trigger.

3. Specify Modified as the change type to trigger the flow.

4. Choose the relevant table and column to monitor for changes. The logical name should be specified here.

Power Automate Flow with the Modified Trigger

3. Create a new command/button in the command designer

Open the model-driven app. In the model-driven app select Edit commandbar. You will now create a New Command.

5. In the top bar select New → Command. A new button with the text NewCommand is added to the command bar. Configure the command properties to the right.

  • 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.
  • Action Type: Choose “Power Fx” as the action type for this command.

6. Define the button’s functionality to execute a Power FX Patch function upon click. This function will update the locked date field with the current timestamp using Now(). Subsequently, any modification to this field will activate the Power Automate flow since we added the trigger to the Power Automate flow to trigger on Modify for this column.

Here is the Power FX code that will run onSelect for the Command.

Patch('[The table with the trigger column]',Self.Selected.Item{'Power FX Flow Trigger': Now()}); Notify('The number formatting has been triggered. Please refresh the page to see the results.')
The command designer with the new command and the Power FX code

4. Test the functionality

Make sure the app and the changes in the command designer are published. Run the app. Add a unformatted phone number to the form.

7. Click the FX Format Numbers button.

8. The Power Fx will update the trigger date column with todays date and the notification message will be displayed at the top of the page. When the page is refreshed the phone number should be formatted.

The new command in action

Previous Post

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

Next Post

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

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
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

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