Model-Driven App Command Bar Not Updating Choices in PowerFx

Model-Driven App Command Bar Not Updating Choices in PowerFx

Recently, I encountered an unexpected behavior with the command bar in a model-driven application. I had made some changes to the choices in a Dataverse table, but when I went to use the command bar, the changes were not reflected there.

I was a bit confused, as I had expected the command bar to automatically update with the new choices from the Dataverse table. After doing some research and troubleshooting, I discovered that in order for the new labels for choices to show up in Power FX in the command bar, you have to re-publish.

It is an easy fix to resolve this issue:

  1. Open the command bar for the table where the PowerFX command is located at.
  2. On top-right corner, select "Open component library" (don't forget to save current changes).
  3. Once the library has opened, you will need to re-publish the component library.
  4. That's it! You can return back to the command bar, refresh, and the updated choice labels should now be available.
Opening component library
Publish the component library

So, if you ever make changes to the labels for choices in a Dataverse table, you'll need to remember to re-publish the component library for those changes to show up in the command bar in Power FX. It's a simple fix, but it's important to know about it. Once you've re-published the library, head back to the command bar, refresh, and you should see your updated labels.