Unleash the Power Fx of commands in Power Apps
Heman: I have the power - via gifer.com

Unleash the Power Fx of commands in Power Apps

In the new command bar editor that Microsoft released for model-driven Power Apps you can use both JavaScript as well as Power Fx formulas. In this article I’ll show you an example of how easily you can use Power Fx to create an action button in the ribbon that interacts with data of the record.

In this example I will create a button to search for the account name in google. By pressing the button the search results will appear in a new tab in the browser.

Search button in the command bar of the form in Power Apps
Google results for the account name in power apps

The command bar editor is available in the app editor via make.powerapps.com Select your model-driven app and press edit.

Power App in make portal

Click on the ellipsis besides the table you like to create the button for, in the case Account, and select Edit command bar.

app editor

There are four different command bars per table, for the main grid (view), main form, subgrid view (on the form), and associated view (on the form, via related). In this case choose Main form and press Edit.

Choose command bar

In the Commands left menu press + New and select Command. This will create a new command.

Create command

Select the new command, move it to a good location in the bar and in the right Command menu give it a name under Label, select and icon, select Run formula under Action and press fx Open formula bar. In the fx bar on the top, type in the following formula:

Launch(Concatenate("https://www.google.com/search?q=",Self.Selected.Item.'Account?Name'))

This will launch a website URL. The first part of this URL is the standard search URL for Google and the second part refers to the name of the account record in Power Apps.

Customize command

By pressing Save and Publish in the upper right corner, the new search button in the command bar will be available for the app users.

Using Power Fx in the command bar is a much easier option to creating button that interacts with the data in Power Apps. I hope Microsoft will invest more in this area. For example, starting a cloud flow in Power Automate from a command by Power Fx. As a solution that can be deployed to another environment without the need for customizing it.

要查看或添加评论,请登录

Timothy Bohte的更多文章

  • Microsoft Teams and Dynamics 365 Sales integration’s hidden gem

    Microsoft Teams and Dynamics 365 Sales integration’s hidden gem

    This is something I found out and couldn’t find any information about. It concerns when you have an activate…

  • Making a custom button to run a flow – the easy way

    Making a custom button to run a flow – the easy way

    Flows that are created from the command bar in Dynamics 365 use the Dataverse (legacy) connector. Microsoft announced…

    2 条评论
  • Copying a standard security role in Dataverse

    Copying a standard security role in Dataverse

    The other day someone told me that the standard security roles for use of the marketing app in Dataverse could not be…

  • Power Automate your anniversary congratulations

    Power Automate your anniversary congratulations

    You can use Power Automate to send anniversary congratulations by comparing today’s date with another date. In this…

  • Make memory foam in Power Apps ?????

    Make memory foam in Power Apps ?????

    Memory foam has the unique ability to remember the last imprint. If you have used a memory foam mattrass before, you…

    2 条评论
  • The Duplicates Dilemma

    The Duplicates Dilemma

    With duplicates I mean records in Dynamics 365 (Dataverse) that have the same important values or are exactly the same,…

  • The notification normalization

    The notification normalization

    Sending contextual in apps notifications to users of model driven mobile apps and canvas apps is already the new normal…

  • Power Apps offline issue with Dataverse

    Power Apps offline issue with Dataverse

    The model driven Power Apps have offline capabilities out of the box. In canvas Power Apps on the other hand, you need…

  • Assigning multiple records to an owner in Power Apps – like a boss ??

    Assigning multiple records to an owner in Power Apps – like a boss ??

    Assigning multiple records to a new owner at once is super easy in a Power Apps model driven app. It doesn’t need any…

  • User impersonation in Power Automate flow

    User impersonation in Power Automate flow

    In the Dataverse connector triggers and actions in Power Automate cloud flow I like using the user impersonation…

    1 条评论

社区洞察

其他会员也浏览了