Canvas App Code Reuse

This XrmToolBox tool allows you to replace the formula of Power Apps canvas app by injecting it between the specified comment tags (developed by Alex Shlega).

In canvas app development, there is no simple way to reuse the same code/formulas without a hidden button OnSelect workaround.
To use the same code in multiple places of the canvas app, you can add "code tags" in those places and use this tool to add/replace the code snippet between those "code tags".
  • Tool Information
  • Documentation
  • Functionalities
    • Inject the code snippet into the canvas app formulas (Fig. 1, Pt. 7) (Fig. 2) (Fig. 3)
      • Set the project folder to save the settings (solution name) and tags + code snippets (Fig. 1, Pt. 1)
      • Select the solution where the canvas app(s) with code tags (Fig. 1, Pt. 2)
      • Add the code tags (Fig. 1, Pt. 3)
        • Delete the code tags (Fig. 1, Pt. 5)
      • Enter the code snippet to inject between the code tags (Fig. 1, Pt. 4)
      • Save the settings and tags + code snippets (Fig. 1, Pt. 6)

Fig. 1 - Canvas App Code Reuse

Fig. 2 - Canvas App Formula (Before)


Fig. 3 - Canvas App Formula (After)

This is part of the #TooLDR series where I test and review the tools for Power Platform. You can check out the information for the other tools on this page.

Comments

Popular Posts