Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Commands have one of three scopes. The scope determines whether a command (schemaname = appaction
) will render for a table within a single app, for a table across all apps, or for all tables and all apps.
A command must be bound to a command bar location such as main grid or main form regardless of scope. Therefore, changing the scope will not render the command in different command bar locations such as main grid and main form.
Important
Commands using Power Fx for the action and/or visibility can't be converted to table or global scope at this time.
When commands are nested within dropdown lists, groups, and split buttons, all must be set to the same scope.
If a global or table scope command is edited within modern command designer, a copy (instance) is created with app scope and linked to the original command. For example, editing a global scope command in command designer overrides the original global scope command but only for the specific app and table chosen when opening command designer. All other apps and tables will will render the original command. The copy (instance) now has it's own lifecycle. Changes to the original global scope command will not effect the new app scope instance and vice versa.
More narrow scopes can override a broader scope command at every level. The most narrow scope wins.
Create one or more commands within your solution using command designer. Alternatively, create a separate solution and select Add existing > Table.
Choose Select objects, and then add the desired commands.
Select Export to export your solution.
If you've made recent changes that haven't yet been published, select Publish. Then, select Run to check whether the solution has any issues or dependencies, and then select Next.
Select the Unmanaged option, and then select Export.
In the Download dialog box, select Save, and in the Download complete dialog box, select Open Folder.
Right-click to select the compressed .zip file that you downloaded, and then select Extract All.
Select a location to extract the files to, and then select Extract.
Open the folder to the extracted files, open the appaction.xml file, and find the desired command (appaction).
Delete the appmoduleid node from the xml.
<appmoduleid>
<uniquename>demo_DemoFestApp</uniquename>
</appmoduleid>
Change the value of the appaction uniquename. Changing any one of the last characters is sufficient, such as from 1 to 2, or you can use more descriptive naming conventions if desired.
Example XML.
<appaction uniquename="crdff_NewCommand!a078463b5d7c473d8965f0f80469f412!crdff_CustomApp!crdff_entity1!1">
<buttonlabeltext default="Show Alert">
<label description="Show Alert" languagecode="1033" />
</buttonlabeltext>
<buttonsequencepriority>10.0000000000</buttonsequencepriority>
<context>1</context>
<contextentity>
<logicalname>crdff_entity1</logicalname>
</contextentity>
<fonticon>AALinkedInLogo</fonticon>
<contextvalue>crdff_entity1</contextvalue>
<hidden>0</hidden>
<iscustomizable>1</iscustomizable>
<location>1</location>
<name>EntityScoped!a078463b5d7c473d8965f0f80469f412</name>
<onclickeventjavascriptfunctionname>ShowAppAlert</onclickeventjavascriptfunctionname>
<onclickeventjavascriptparameters>[]</onclickeventjavascriptparameters>
<onclickeventjavascriptwebresourceid>
<webresourceid>ac21ad24-3c11-ef11-b6u7-000d3a1d942c</webresourceid>
</onclickeventjavascriptwebresourceid>
<onclickeventtype>2</onclickeventtype>
<statecode>0</statecode>
<statuscode>1</statuscode>
<type>0</type>
</appaction>
After you've edited and saved the appaction.xml file, zip your solution in the same format it was exported in. Then Import the solution back into your environment and test the behavior.
Follow the same steps above to edit the appaction.xml file.
Delete the appmoduleid node from the xml:
<appmoduleid>
<uniquename>demo_DemoFestApp</uniquename>
</appmoduleid>
Change the value of the appaction uniquename. Changing any one of the last characters is sufficient, such as from 1 to 2, or you can use more descriptive naming conventions if desired.
Delete the contextentity and contextvalue nodes from the xml:
<contextentity>
<logicalname>account</logicalname>
</contextentity>
<contextvalue>account</contextvalue>
Change the context value from 1 to 0.
<appaction uniquename="crdff_NewCommand1!8fe72a85-1f84-431e-ac56-854f1bfadc4e!1">
<buttonlabeltext default="Show Alert">
<label description="Show Alert" languagecode="1033" />
</buttonlabeltext>
<buttonsequencepriority>10.0000000000</buttonsequencepriority>
<context>0</context>
<hidden>0</hidden>
<iscustomizable>1</iscustomizable>
<fonticon>AALinkedInLogo</fonticon>
<location>1</location>
<name>EntityScoped!a078463b5d7c473d8965f0f80469f412</name>
<onclickeventjavascriptfunctionname>ShowGlobalAlert</onclickeventjavascriptfunctionname>
<onclickeventjavascriptparameters>[]</onclickeventjavascriptparameters>
<onclickeventjavascriptwebresourceid>
<webresourceid>ac21ad24-3c01-ec11-b6e7-000d3a1d942c</webresourceid>
</onclickeventjavascriptwebresourceid>
<onclickeventtype>2</onclickeventtype>
<statecode>0</statecode>
<statuscode>1</statuscode>
<type>0</type>
</appaction>
After you've edited and saved the appaction.xml file, zip your solution in the same format it was exported in. Then Import the solution back into your environment and test the behavior.
This example is for when you want a global scope command to be the same everywhere except for a certain table.
crdff_entity1
grids in all apps except in crdff_CustomApp
.crdff_entity1
.Note
To override either global or table scope commands with an app scope command, simply edit the command using command designer.
To override a global scoped command with a table scope command, modify the appactions.xml files so they have the same XML <name>
.
Follow the steps in How to create a global scope command, but create two commands using command designer.
As described in the steps, export your solution and edit the appactions.xml files.
Continue following the steps to create one global and one entity scope command.
Set the name property to be the exact same for both the global and entity scope commands.
<appaction uniquename="crdff_NewCommand1!8fe72a85-1f84-431e-ac56-854f1bfadc4e!1">
<buttonlabeltext default="Show Alert">
<label description="Show Alert" languagecode="1033" />
</buttonlabeltext>
<buttonsequencepriority>10.0000000000</buttonsequencepriority>
<context>0</context>
<hidden>0</hidden>
<iscustomizable>1</iscustomizable>
<fonticon>AALinkedInLogo</fonticon>
<location>1</location>
<name>EntityScoped!a078463b5d7c473d8965f0f80469f412</name>
<onclickeventjavascriptfunctionname>ShowGlobalAlert</onclickeventjavascriptfunctionname>
<onclickeventjavascriptparameters>[]</onclickeventjavascriptparameters>
<onclickeventjavascriptwebresourceid>
<webresourceid>ac21ad24-3c01-ec11-b6e7-000d3a1d942c</webresourceid>
</onclickeventjavascriptwebresourceid>
<onclickeventtype>2</onclickeventtype>
<statecode>0</statecode>
<statuscode>1</statuscode>
<type>0</type>
</appaction>
<appaction uniquename="crdff_NewCommand!a078463b5d7c473d8965f0f80469f412!crdff_entity1!1">
<buttonlabeltext default="Show Alert">
<label description="Show Alert" languagecode="1033" />
</buttonlabeltext>
<buttonsequencepriority>10.0000000000</buttonsequencepriority>
<context>1</context>
<contextentity>
<logicalname>crdff_entity1</logicalname>
</contextentity>
<fonticon>AALinkedInLogo</fonticon>
<contextvalue>crdff_entity1</contextvalue>
<hidden>0</hidden>
<iscustomizable>1</iscustomizable>
<location>1</location>
<name>EntityScoped!a078463b5d7c473d8965f0f80469f412</name>
<onclickeventjavascriptfunctionname>ShowEntityAlert</onclickeventjavascriptfunctionname>
<onclickeventjavascriptparameters>[]</onclickeventjavascriptparameters>
<onclickeventjavascriptwebresourceid>
<webresourceid>ac21ad24-3c01-ec11-b6e7-000d3a1d942c</webresourceid>
</onclickeventjavascriptwebresourceid>
<onclickeventtype>2</onclickeventtype>
<statecode>0</statecode>
<statuscode>1</statuscode>
<type>0</type>
</appaction>
Events
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreTraining
Module
Advanced command bar concepts - Training
Explore advanced customization techniques for command bars in Power Apps model-driven apps, including JavaScript implementation and AutoSave features.
Certification
Microsoft Certified: Power Platform Developer Associate - Certifications
Demonstrate how to simplify, automate, and transform business tasks and processes using Microsoft Power Platform Developer.