Power Apps: Streamline Apps with YAML
Power Apps
26. Sept 2025 18:13

Power Apps: Streamline Apps with YAML

von HubSite 365 über Warner Digital

Microsoft expert: Power Apps With() in Power Platform YAML for cleaner reusable snippets, flexible low code layouts

Key insights

  • Video overview: This YouTube tip walks through how the With() function improves Power Apps snippets and layout work in YAML.
    It’s a short, practical demo that focuses on cleaner, more reusable code rather than deep theory.
  • What With() does: With() creates temporary, scoped variables inside an expression to avoid repeating complex formulas.
    This makes formulas easier to read, debug, and reuse across controls.
  • Power Apps Code View and YAML editing: Power Apps Studio now exposes a Code View that shows app components as editable YAML.
    You can copy YAML snippets between apps or edit them in external editors for faster workflows.
  • Code reuse and version control: Human-readable YAML makes it simple to share UI snippets and track changes with standard version control tools.
    This speeds development and encourages modular app components.
  • Automated testing and Power Fx integration: Test plans can use YAML and Power Fx scripts to automate realistic app interactions, improving test coverage and reliability.
    Integration helps validate behavior before deployment.
  • Practical demo tips: The demo shows using With() to change colors and simplify layouts, and highlights challenges when you don’t use it.
    Tip: use With() to make layouts smoother and create reusable snippets for consistent UI behavior.

Overview of the video

In a recent YouTube video, Warner Digital highlights practical tips for using the With() function inside Power Apps when working with YAML-based app definitions. The episode forms part of a series on Power Platform YAML tips and focuses on cleaning up snippets, improving reuse, and making layouts more flexible. Consequently, the presentation targets both makers who prefer visual design and developers who want to edit app structure as code. Overall, the video frames this feature as a simple but useful step toward more modular app development.

Moreover, Warner Digital emphasizes that editing app components as YAML inside the editor or in external tools can speed collaboration and versioning. The video notes a preview capability to view and edit canvas apps in a code-like view, and it demonstrates how With() helps by creating temporary scoped variables that simplify complex expressions. Therefore, the segment appeals to teams that need to share snippets and maintain consistent UI behavior across apps. At the same time, the author keeps the demo approachable for newcomers by focusing on short, practical examples.

What the demonstration shows

The demo runs through key scenarios where the absence of scoped variables leads to repetitive code, and then contrasts that with examples that use With() to tidy formulas. For instance, the presenter shows how changing color properties across controls becomes easier when intermediate values are defined once and reused. Then, Warner Digital walks through a small layout example that becomes cleaner after introducing scoped variables, which reduces duplication and lowers the chance of errors. As a result, the audience sees a direct before-and-after comparison that clarifies the function’s value.

Furthermore, the video addresses practical developer workflows by demonstrating how YAML snippets can be copied between apps and edited externally in a text editor. The host briefly covers community resources and badges to encourage sharing, while also noting that these capabilities are evolving. Consequently, the tutorial balances quick wins with a realistic view of what to expect while the features remain in preview. In short, the hands-on sections reinforce that small changes in structure yield clearer and more maintainable app definitions.

Benefits and tradeoffs

One clear benefit Warner Digital highlights is improved code reuse: teams can extract and paste YAML snippets for buttons, galleries, and screens, which speeds up development. Moreover, using With() reduces formula complexity by creating readable, scoped variables, which improves maintainability and aids debugging. Additionally, editing in text form supports standard version control workflows and collaboration across roles, which brings a familiar discipline to low-code development. These gains, however, come with tradeoffs that teams must weigh.

For example, while direct YAML editing enables source control, it also introduces a learning curve for makers used to the visual designer; consequently, teams must balance accessibility with the power of code. Similarly, relying on shared snippets increases reuse but can introduce coupling between apps if teams do not document expectations and dependencies. Therefore, organizations should consider standards and naming conventions when sharing components to avoid future confusion. In practice, the tradeoff is between speed and governance.

Finally, preview features and evolving APIs mean that tooling may change, and that can require occasional refactors of saved snippets. While the video presents a stable workflow, Warner Digital cautions that preview functionality can update. Thus, teams must plan for intermittent work to adapt their code and test scripts as the platform matures. Consequently, the adoption timeline should account for ongoing platform updates and internal training.

Challenges and limitations

Warner Digital also discusses notable challenges, including potential merge conflicts when multiple contributors edit YAML snippets in parallel. Since YAML is text-based, teams gain the benefit of diffing, yet they also face the classic pitfalls of text merges unless they adopt disciplined branching and review practices. Furthermore, mixing visual edits and direct code edits can create inconsistencies if the tooling does not always sync changes predictably. As a result, developers must coordinate workflows carefully to avoid losing work or introducing subtle regressions.

Another limitation is maturity: several capabilities remain in public preview, and automation features require careful integration with test engines and deployment processes. Therefore, teams that rely on strict SLAs or production stability should pilot these features before wide rollout. Moreover, governance and security reviews must include YAML artifacts, especially when snippets capture UI logic that influences data access. In effect, the new approach shifts some operational considerations from UI design into development lifecycle management.

Practical advice for adopters

For teams ready to try these features, Warner Digital’s video suggests starting small and documenting patterns that work well. For example, adopt With() where it clearly reduces repetition and keep snippets focused on single responsibilities so they remain reusable and easy to test. Additionally, use source control from the outset and establish merge policies to minimize conflicts, which supports collaborative editing while preserving auditability. These steps help teams scale adoption without sacrificing quality.

Moreover, integrate automated tests early by leveraging available testing hooks and preview functions to verify behavior after edits. Regularly review shared components to prevent drift and to ensure accessibility and performance targets are met. Ultimately, Warner Digital frames these practices as practical guardrails: they make it easier to enjoy the benefits of YAML editing and With() while controlling the operational risks. In conclusion, the video serves as a useful primer that balances promise with realistic guidance for teams moving toward code-driven Power Apps workflows.

Power Apps - Power Apps: Streamline Apps with YAML

Keywords

Power Apps With function, With function Power Fx, Using With in Power Apps, Power Apps YAML integration, Power Apps YAML pipelines, Power Apps expressions best practices, Power Fx tutorials With, Power Apps DevOps YAML