Citizen Developer
Zeitspanne
explore our new search
​
Power Apps: With() + YAML Snippet Tips
Power Apps
23. Nov 2025 13:09

Power Apps: With() + YAML Snippet Tips

von HubSite 365 über Microsoft

Software Development Redmond, Washington

Power Apps With() YAML tips simplify formulas, shape types, tweak SVGs and enable dynamic galleries with Dataverse

Key insights

  • YAML snippets — David Warner demonstrates how Power Apps represents controls as editable YAML, letting developers copy, edit, and reuse whole controls across apps.
  • With() — Use With() to set local values once, cut repeated calculations, and make formulas clearer and easier to maintain.
  • Power Fx and Code View — Edit YAML and Power Fx directly inside Power Apps Studio Code View to change layout, colors, and logic faster during development.
  • Practical uses — The demo shows SVG color updates, dynamic galleries, and conditional logic connected to Dataverse as real examples of the pattern.
  • Portability and data shaping — With() helps convert and adapt data types so controls move between apps without breaking references or behavior.
  • Best practices — Centralize properties like colors or animation with With(), keep snippets modular, and test changes step by step for easier adoption.

Microsoft published a demonstration video on 11 September 2025 that highlights practical tips for working with YAML snippets in Power Apps. In the clip, presenter David Warner focuses on how the With() function can simplify formulas, change data shapes, and make snippets easier to adopt across apps. For editorial context, this story summarizes the recorded community call and explains why the technique matters for makers and pro developers alike.

Clear overview of the technique

First, Warner frames YAML snippets as a readable way to copy and reuse entire controls inside Power Apps Studio. He then shows how editing a control’s YAML in the Code View can speed up development by exposing position, color, and logic settings in plain text. Consequently, the combination of YAML and Power Fx unlocks faster iteration and easier sharing of UI elements among teams.

Moreover, the demonstration stresses the role of the With() function as a local scoping tool that reduces repeated expressions. By defining values once and referencing them inside a single expression, developers can shorten formulas and lower the risk of mistakes when controls move between apps. Thus, the pattern promotes cleaner snippets and a clearer path to reuse.

Practical demonstrations in the video

Warner walks viewers through several hands-on examples, including SVG color swaps, dynamic gallery behaviors, and conditions tied to Dataverse values. These demos show how With() can hold intermediate values like computed colors or layout offsets so that a single change updates all dependent properties. As a result, visual behaviors become easier to tune and to reason about during reviews or handoffs.

In addition, the presenter covers dynamic galleries and conditional logic, emphasizing that snippets can contain interactive rules, not just static properties. He demonstrates how snippets move between apps and how the scoping function helps to adapt types when the underlying data context differs. Therefore, teams gain portability without losing the ability to customize behavior for each app instance.

Workflow and reusability benefits

From a workflow perspective, the integration of YAML editing inside the Studio supports both low-code creators and pro devs who prefer source-oriented edits. When teams manage snippets centrally, they can apply consistent styles and interaction patterns across multiple apps, which improves maintainability and reduces duplicated effort. Consequently, organizations can balance governance and speed more effectively.

Furthermore, the approach complements testing and automation efforts because YAML lends itself to version control and automated checks. Since snippets represent controls as text, teams can track changes, run diff-based reviews, and include them in automated deployments. Thus, developers can treat UI artifacts like code and bring established practices to low-code projects.

Tradeoffs and implementation challenges

Despite the advantages, Warner and the community acknowledge tradeoffs that teams must navigate. For example, while With() simplifies expressions, excessive scoping can obscure where values originate, which may confuse new contributors. Therefore, teams must adopt conventions and documentation to prevent opaque snippets and to maintain clarity during handoffs.

Also, moving snippets between environments can expose type differences and missing dependencies, especially when Dataverse tables or custom components differ. Although With() can help shape-shift data types, authors must still test snippets in target apps and consider fallback logic. In short, portability increases efficiency but requires governance, testing, and careful error handling.

Community impact and next steps

Finally, Microsoft’s community call format invites contributors to share patterns and build a shared snippet gallery, helping others adopt proven techniques. This video amplifies that effort by showing concrete examples and by pointing viewers toward sample collections and guidance. As a result, makers get a stronger starting point for applying these ideas in real projects.

In conclusion, the video makes a practical case for using YAML snippets together with the With() function to create cleaner, more portable Power Apps controls. While the approach accelerates reuse and collaboration, it also brings governance and testing responsibilities that teams must address. Overall, the technique offers a useful balance between rapid iteration and maintainable app design for the Power Platform community.

Power Apps - Power Apps: With() + YAML Snippet Tips

Keywords

Power Apps YAML tips, Power Apps With() function, YAML snippet examples for Power Apps, Power Apps best practices, Power Fx With usage, Power Apps code snippets, Power Apps developer tips, Using With in Power Apps