Add Custom Commands to Command Bar using Command Designer

| Hafsa Farooqui

Add Custom Commands to Command Bar using Command Designer

(In model-driven app)

Power Apps provided the option to add custom commands to the command bar. This dramatically lowers the barrier for developing model-driven apps because now anyone can customize the command bar. The best thing is that the only coding language you need to be familiar with is Power FX, which is the same language used to make canvas apps. 

To add a custom command on the command bar, you have to follow these steps:

  • Create a new model-driven app

Custom commands

  • Select the table on which you want to add command, then select three dots (…) and select “Edit command bar”

Custom commands

  • Choose the command bar you want to edit. There are four command bar locations:
  • Main Grid
    • This command bar is displayed when you open an app and where you can see the view of a table.
  • Main Form
    • This command bar is displayed on the main form of the table.
  • Subgrid View
    • This command bar is displayed on the sub grid of another table.
  • Associated View
    • This command bar is displayed on the form of a parent table when viewing related data in this table.

Custom commands

Then select “Edit’

  • To create a new command, Select “New”, then “Command”

Custom commands


  • Select the component library

Custom commands

We will use Power FX for now.

  • On the right-side select the properties for the button and enter its Label and Action that this button will perform, Select Icon, Set Visibility and Order number.

Custom commands

  • In Action, Choose “Run Formula” and enter the Power FX formula

Custom commands

  • Select “Save and Publish”, then “Play”

Custom commands

  • The custom command will be shown on main form and button will open a new form

Custom commands

Custom commands

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.


M
Chief Architect, Founder, and CEO - a Microsoft recognized Power Platform solution architect.

About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting