<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sofiane Mebchour</title>
    <description>The latest articles on DEV Community by Sofiane Mebchour (@sofianem8).</description>
    <link>https://dev.to/sofianem8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4015888%2F72301df6-8f4b-4efa-9e9e-adb79d303ec7.png</url>
      <title>DEV Community: Sofiane Mebchour</title>
      <link>https://dev.to/sofianem8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sofianem8"/>
    <language>en</language>
    <item>
      <title>Delegation in Power Apps, Explained With Real Queries</title>
      <dc:creator>Sofiane Mebchour</dc:creator>
      <pubDate>Wed, 16 Sep 2026 22:03:01 +0000</pubDate>
      <link>https://dev.to/sofianem8/delegation-in-power-apps-explained-with-real-queries-327o</link>
      <guid>https://dev.to/sofianem8/delegation-in-power-apps-explained-with-real-queries-327o</guid>
      <description>&lt;p&gt;If you've built more than two canvas apps, you've seen it: the &lt;strong&gt;blue squiggly underline&lt;/strong&gt; in the formula bar, a yellow warning triangle, and a message about "delegation". Most makers hover it once, shrug, and move on — until a user reports that a record they &lt;em&gt;know&lt;/em&gt; exists doesn't show up in the app.&lt;/p&gt;

&lt;p&gt;That missing record is delegation. It's the single most common source of "the app is losing data" bugs in Power Apps, and it's entirely predictable once you understand what's happening under the hood.&lt;/p&gt;

&lt;h2&gt;
  
  
  What delegation actually is
&lt;/h2&gt;

&lt;p&gt;When your gallery's &lt;code&gt;Items&lt;/code&gt; property says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filter(Orders, Status = "Open")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;there are two ways Power Apps can evaluate it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Server-side (delegated):&lt;/strong&gt; Power Apps translates your Power Fx into a query the data source understands (OData for SharePoint, FetchXML-ish for Dataverse, SQL for... SQL) and sends it over the wire. The server filters its million rows and returns only the matches. Fast, complete, correct.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Client-side (not delegated):&lt;/strong&gt; Power Apps can't translate part of the formula, so it downloads rows from the source and runs the filter locally on your device.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's the trap: in case 2, Power Apps does &lt;strong&gt;not&lt;/strong&gt; download the whole table. It downloads the first &lt;strong&gt;500 rows&lt;/strong&gt; (the default data row limit, configurable up to 2000) and runs your formula on that subset only.&lt;/p&gt;

&lt;p&gt;So &lt;code&gt;Filter(Orders, Status = "Open")&lt;/code&gt; against a 10,000-row SharePoint list with a non-delegable condition doesn't error out. It returns the open orders &lt;em&gt;among the first 500 rows&lt;/em&gt; — and silently ignores the other 9,500. No error message. No empty gallery. Just quietly wrong results.&lt;/p&gt;

&lt;p&gt;That's what the blue underline is warning you about. It's not a style suggestion. It's "your query will return incomplete data on large tables."&lt;/p&gt;

&lt;h2&gt;
  
  
  The 500/2000 limit
&lt;/h2&gt;

&lt;p&gt;The cap for non-delegable queries lives in &lt;strong&gt;Settings &amp;gt; General &amp;gt; "Data row limit for non-delegable queries"&lt;/strong&gt;. Default is 500, maximum is 2000.&lt;/p&gt;

&lt;p&gt;Raising it to 2000 is a legitimate move when your table genuinely stays small — a reference list of 800 categories, say. But treat it as what it is: a stopgap. At row 2001 the bug comes back, and pulling 2000 rows on every screen load hurts performance on mobile. I wrote up the setting and its trade-offs in more detail in &lt;a href="https://www.powerblocks.dev/guides/increase-data-row-limit" rel="noopener noreferrer"&gt;this guide on the data row limit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The durable fix is always the same: make the query delegable so the cap never applies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Delegation depends on the data source
&lt;/h2&gt;

&lt;p&gt;This is the part most tutorials skip: &lt;strong&gt;delegability is per connector, per function, per operator&lt;/strong&gt;. The same formula can be fully delegable against Dataverse and non-delegable against SharePoint.&lt;/p&gt;

&lt;p&gt;Rough hierarchy, from most to least delegation support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dataverse&lt;/strong&gt; — the widest support: &lt;code&gt;Filter&lt;/code&gt;, &lt;code&gt;Sort&lt;/code&gt;, &lt;code&gt;LookUp&lt;/code&gt;, comparison operators, &lt;code&gt;StartsWith&lt;/code&gt;, &lt;code&gt;And/Or/Not&lt;/code&gt;, aggregates like &lt;code&gt;Sum&lt;/code&gt;/&lt;code&gt;CountRows&lt;/code&gt; in many cases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQL Server&lt;/strong&gt; — very good: most comparisons, &lt;code&gt;StartsWith&lt;/code&gt;, sorting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SharePoint&lt;/strong&gt; — noticeably narrower: &lt;code&gt;=&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;StartsWith&lt;/code&gt; are fine, but &lt;strong&gt;&lt;code&gt;Search&lt;/code&gt;, &lt;code&gt;in&lt;/code&gt; on text, &lt;code&gt;IsBlank&lt;/code&gt; in filters, and sorting by complex column types are not delegable&lt;/strong&gt;. Choice and lookup columns have extra quirks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excel / imported static data&lt;/strong&gt; — essentially nothing delegates. Fine for lookup tables under 500 rows, dangerous for anything else.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Practical consequence: if you're choosing a backend for a table that will grow past a couple thousand rows and you're on SharePoint "because it's free", delegation is the tax you'll pay. It's manageable — but only if you write your formulas around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real queries that break, and their delegable rewrites
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Search vs StartsWith
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ❌ Not delegable on SharePoint
Filter(Orders, Search(CustomerName, txtSearch.Text) &amp;gt; 0)

// ❌ Also not delegable on SharePoint (the "in" operator on text)
Filter(Orders, txtSearch.Text in CustomerName)

// ✅ Delegable
Filter(Orders, StartsWith(CustomerName, txtSearch.Text))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, &lt;code&gt;StartsWith&lt;/code&gt; only matches from the beginning of the string. For a search box, that's usually acceptable — and it's infinitely better than a "contains" search that only searches the first 500 rows.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Functions inside the filter condition
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ❌ Not delegable — the source can't evaluate Text() or Year()
Filter(Orders, Text(OrderDate, "yyyy") = "2026")

// ✅ Delegable — compare against plain values the server understands
Filter(Orders, OrderDate &amp;gt;= Date(2026, 1, 1), OrderDate &amp;lt; Date(2027, 1, 1))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rule of thumb: &lt;strong&gt;the column stays naked on the left side&lt;/strong&gt;. The moment you wrap the column in a function (&lt;code&gt;Text()&lt;/code&gt;, &lt;code&gt;Lower()&lt;/code&gt;, &lt;code&gt;Year()&lt;/code&gt;, arithmetic), the server can't translate it and evaluation falls back to the client.&lt;/p&gt;

&lt;p&gt;Same idea with computed values — pre-compute them into a variable &lt;em&gt;before&lt;/em&gt; the query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ❌ Function call evaluated per-row inside the filter
Filter(Tasks, DueDate &amp;lt; DateAdd(Today(), 7, TimeUnit.Days))

// ✅ Compute once, filter on the plain value
Set(varWeekOut, DateAdd(Today(), 7, TimeUnit.Days));
Filter(Tasks, DueDate &amp;lt; varWeekOut)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Whether the first version delegates varies by connector — the second version removes the doubt everywhere.)&lt;/p&gt;

&lt;h3&gt;
  
  
  3. LookUp on a non-delegable condition
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ❌ IsBlank inside a filter is not delegable on SharePoint
LookUp(Orders, IsBlank(ClosedDate))

// ✅ Compare to Blank() directly (delegable on most sources)
LookUp(Orders, ClosedDate = Blank())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Filter server-side first, then do the fancy stuff locally
&lt;/h3&gt;

&lt;p&gt;You don't have to make &lt;em&gt;everything&lt;/em&gt; delegable — you have to make the part that touches the big table delegable. Once the result set is small, client-side evaluation is harmless:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Delegable date-range filter reduces 50,000 rows to ~200,
// then the non-delegable sort runs safely on the small result
SortByColumns(
    Filter(Orders, OrderDate &amp;gt;= varMonthStart, OrderDate &amp;lt; varMonthEnd),
    "CustomerName",
    SortOrder.Ascending
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This "narrow on the server, refine on the client" pattern solves 80% of real-world delegation problems without any exotic workaround.&lt;/p&gt;

&lt;h2&gt;
  
  
  The collections workaround (and its caveats)
&lt;/h2&gt;

&lt;p&gt;The classic hack for "I need all 8,000 rows locally" is chunked &lt;code&gt;ClearCollect&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ClearCollect(colAll, Filter(Orders, ID &amp;gt;= 1, ID &amp;lt;= 2000));
Collect(colAll, Filter(Orders, ID &amp;gt;= 2001, ID &amp;lt;= 4000));
Collect(colAll, Filter(Orders, ID &amp;gt;= 4001, ID &amp;lt;= 6000));
Collect(colAll, Filter(Orders, ID &amp;gt;= 6001, ID &amp;lt;= 8000));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each chunk is a delegable query under the row limit, so you end up with the full table in a collection. It works. I've used it. And you should know exactly what you're signing up for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's a snapshot.&lt;/strong&gt; The collection is stale the moment it's built; edits by other users won't appear until you re-collect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load time and memory.&lt;/strong&gt; Thousands of rows over the wire on app start, on every device.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The ID ranges are a maintenance trap.&lt;/strong&gt; Gaps are fine, but growth isn't — at row 8,001 you're silently dropping data again, which is the exact bug you were trying to fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It caps out.&lt;/strong&gt; Somewhere in the tens of thousands of rows this stops being viable at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use it for genuinely bounded, read-mostly datasets (a product catalog, a location list). For anything that grows unbounded, fix the query instead — or move the table to Dataverse where the query can delegate.&lt;/p&gt;

&lt;h2&gt;
  
  
  A workflow that keeps you honest
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never ignore the blue underline.&lt;/strong&gt; Hover it — Studio tells you &lt;em&gt;which part&lt;/em&gt; of the formula is non-delegable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test with realistic volume.&lt;/strong&gt; Delegation bugs are invisible with 50 test rows. Load 1,000+ rows before you trust a screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Know your connector's delegable list.&lt;/strong&gt; Check Microsoft's per-connector documentation when in doubt — SharePoint's list is short enough to memorize.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the column bare on the left side&lt;/strong&gt; of every comparison inside &lt;code&gt;Filter&lt;/code&gt;/&lt;code&gt;LookUp&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I keep a fuller checklist of fixes in the &lt;a href="https://www.powerblocks.dev/guides/fix-delegation-warning" rel="noopener noreferrer"&gt;delegation warning guide&lt;/a&gt; — it's the write-up I send to teammates when the blue underline shows up in a code review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;Delegation isn't a Power Apps quirk to memorize around — it's the fundamental question of &lt;em&gt;where your query runs&lt;/em&gt;. Server-side means complete and fast; client-side means the first 500-2000 rows and a silent data bug. Write filters the server can translate, narrow before you refine, and treat the row limit setting as a last resort.&lt;/p&gt;

&lt;p&gt;For quick syntax reference while rewriting formulas (including the delegable-friendly patterns above, in both EN and FR locale syntax), I maintain a free &lt;a href="https://www.powerblocks.dev/tools/expressions" rel="noopener noreferrer"&gt;Power Fx expression cheatsheet&lt;/a&gt; as part of PowerBlocks, my Power Apps component library — no login needed.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's the nastiest delegation bug you've shipped to production? Share yours in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>powerapps</category>
      <category>powerplatform</category>
      <category>lowcode</category>
      <category>dataverse</category>
    </item>
    <item>
      <title>The Power Fx Formulas You Actually Use Every Day (With French Locale Gotchas)</title>
      <dc:creator>Sofiane Mebchour</dc:creator>
      <pubDate>Mon, 14 Sep 2026 13:23:52 +0000</pubDate>
      <link>https://dev.to/sofianem8/the-30-power-apps-formulas-you-actually-use-with-french-locale-gotchas-i78</link>
      <guid>https://dev.to/sofianem8/the-30-power-apps-formulas-you-actually-use-with-french-locale-gotchas-i78</guid>
      <description>&lt;p&gt;Every Power Apps maker ends up googling the same formulas over and over. This is the cheatsheet I wish I had — organized by what you're actually trying to do, not alphabetically: filtering galleries, validating forms, saving data with Patch, dates, state, and (the part most tutorials skip) the French locale traps that silently break copy-pasted formulas.&lt;/p&gt;

&lt;p&gt;And because half my projects run in French environments: the &lt;strong&gt;locale gotchas&lt;/strong&gt; that silently break copy-pasted formulas, which almost no English tutorial mentions.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Filtering a gallery (the big one)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Basic filter
Filter(Orders, Status = "Open")

// Search-as-you-type (delegable)
Filter(Orders, StartsWith(CustomerName, SearchInput.Text))

// Combine search + dropdown filter
Filter(Orders,
  StartsWith(CustomerName, SearchInput.Text),
  ddStatus.Selected.Value = "All" || Status = ddStatus.Selected.Value
)

// Sort the result
SortByColumns(Filter(Orders, Status = "Open"), "OrderDate", SortOrder.Descending)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delegation tip: prefer &lt;code&gt;StartsWith()&lt;/code&gt; over &lt;code&gt;Search()&lt;/code&gt; and &lt;code&gt;in&lt;/code&gt; on large sources — non-delegable functions silently cap your results at 500-2000 rows.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Validating a form
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Required field + email shape
If(
  IsBlank(txtEmail.Text) || !IsMatch(txtEmail.Text, Match.Email),
  Notify("Please enter a valid email", NotificationType.Error),
  SubmitForm(EditForm1)
)

// Disable the submit button until valid
DisplayMode: If(
  !IsBlank(txtName.Text) &amp;amp;&amp;amp; IsMatch(txtEmail.Text, Match.Email),
  DisplayMode.Edit,
  DisplayMode.Disabled
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key functions: &lt;code&gt;IsBlank()&lt;/code&gt;, &lt;code&gt;IsMatch()&lt;/code&gt;, &lt;code&gt;IsError()&lt;/code&gt;, &lt;code&gt;Coalesce()&lt;/code&gt; (first non-blank value).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Saving data with Patch
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create a record
Patch(Orders, Defaults(Orders), {
  Title: txtTitle.Text,
  Quantity: Value(txtQty.Text),
  DueDate: dpDue.SelectedDate
})

// Update the selected gallery item
Patch(Orders, galOrders.Selected, { Status: "Closed" })

// Create or update in one formula (upsert)
Patch(Orders,
  Coalesce(LookUp(Orders, ID = varID), Defaults(Orders)),
  { Title: txtTitle.Text }
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The #1 Patch trap: type mismatches. &lt;code&gt;Value()&lt;/code&gt;, &lt;code&gt;Text()&lt;/code&gt;, &lt;code&gt;DateValue()&lt;/code&gt; are your friends — a text input is always text, even if it looks like a number.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Dates without tears
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Today()                              // date only
Now()                                // date + time
Text(Today(), "dd/mm/yyyy")          // format for display
DateAdd(Today(), -30, TimeUnit.Days) // 30 days ago
DateDiff(StartDate, EndDate, TimeUnit.Days)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Variables and collections
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set(varUser, User().Email)                   // global variable
UpdateContext({locShowModal: true})          // screen variable
ClearCollect(colItems, Filter(Orders, ...))  // snapshot a query
With({t: Filter(Orders, Status="Open")},     // scoped, no variable at all
  CountRows(t) &amp;amp; " open / " &amp;amp; Sum(t, Amount) &amp;amp; " €"
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;With()&lt;/code&gt; is the most underused function in Power Apps — it replaces most "temporary variable" needs and keeps formulas readable.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The French locale gotchas 🇫🇷
&lt;/h2&gt;

&lt;p&gt;If your formula works in a US tenant and throws syntax errors in a French one, here's why:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Argument separators change.&lt;/strong&gt; In &lt;code&gt;fr-FR&lt;/code&gt;, Power Fx uses &lt;code&gt;;&lt;/code&gt; between arguments (because &lt;code&gt;,&lt;/code&gt; is the decimal separator):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// en-US
Filter(Orders, Status = "Open", Amount &amp;gt; 100)

// fr-FR — same formula
Filter(Orders; Status = "Open"; Amount &amp;gt; 100)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Chained statements use &lt;code&gt;;;&lt;/code&gt;&lt;/strong&gt; in French where English uses &lt;code&gt;;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// en-US:  Set(x, 1); Notify("done")
// fr-FR:  Set(x; 1);; Notify("terminé")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Decimals flip too&lt;/strong&gt;: &lt;code&gt;0.5&lt;/code&gt; (EN) becomes &lt;code&gt;0,5&lt;/code&gt; (FR) inside formulas.&lt;/p&gt;

&lt;p&gt;So a YAML snippet or blog formula written for EN will not paste cleanly into an FR-locale Studio session. Either convert the separators, or keep two variants of your snippets. (I wrote a small &lt;a href="https://www.powerblocks.dev/tools/expressions" rel="noopener noreferrer"&gt;converter as part of PowerBlocks&lt;/a&gt; — the cheatsheet tool shows every formula in both EN and FR syntax, and it's free.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The full searchable list
&lt;/h2&gt;

&lt;p&gt;This article covers the formulas I use daily, but the full reference — 80+ functions with EN/FR examples, searchable and filterable by category, one-click copy — lives here: &lt;a href="https://www.powerblocks.dev/tools/expressions" rel="noopener noreferrer"&gt;Expression Cheatsheet on PowerBlocks&lt;/a&gt; (free, no login). There's a &lt;a href="https://www.powerblocks.dev/tools/power-automate" rel="noopener noreferrer"&gt;Power Automate equivalent&lt;/a&gt; too.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What's the formula you always have to look up? Drop it in the comments — I'll add the most requested ones to the cheatsheet.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>powerapps</category>
      <category>powerplatform</category>
      <category>lowcode</category>
      <category>powerfx</category>
    </item>
    <item>
      <title>Power Apps YAML Components: Build Canvas App UIs by Copy-Pasting Code</title>
      <dc:creator>Sofiane Mebchour</dc:creator>
      <pubDate>Sun, 05 Jul 2026 07:49:46 +0000</pubDate>
      <link>https://dev.to/sofianem8/power-apps-yaml-components-build-canvas-app-uis-by-copy-pasting-code-m57</link>
      <guid>https://dev.to/sofianem8/power-apps-yaml-components-build-canvas-app-uis-by-copy-pasting-code-m57</guid>
      <description>&lt;p&gt;If you build canvas apps in Power Apps, you've probably rebuilt the same modal, search bar, or navigation header a dozen times by hand. There's a better way: since Microsoft introduced YAML support in Power Apps Studio, &lt;strong&gt;entire UI components can be copied and pasted as plain text&lt;/strong&gt; — controls, layout, formulas and all.&lt;/p&gt;

&lt;p&gt;This changes how you can work: components become shareable snippets, reviewable in Git, and reusable across every app and tenant.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Power Apps YAML?
&lt;/h2&gt;

&lt;p&gt;Power Apps Studio serializes canvas controls in a YAML-based format (the same format used by &lt;a href="https://learn.microsoft.com/en-us/power-platform/power-fx/yaml-formula-grammar" rel="noopener noreferrer"&gt;Power Apps Source Code files&lt;/a&gt;, &lt;code&gt;.pa.yaml&lt;/code&gt;). When you copy a control in the Studio tree view, what lands in your clipboard is YAML. The reverse works too: paste valid YAML into the tree view, and Studio recreates the whole control hierarchy.&lt;/p&gt;

&lt;p&gt;A minimal example — a styled button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;PrimaryButton&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Control&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Classic/Button&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;Text&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;="Save changes"&lt;/span&gt;
      &lt;span class="na"&gt;Fill&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;=RGBA(59, 130, 246, 1)&lt;/span&gt;
      &lt;span class="na"&gt;Color&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;=RGBA(255, 255, 255, 1)&lt;/span&gt;
      &lt;span class="na"&gt;Height&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;=40&lt;/span&gt;
      &lt;span class="na"&gt;Width&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;=160&lt;/span&gt;
      &lt;span class="na"&gt;BorderRadius&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;=8&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste that into any screen's tree view (Ctrl+V) and you get a working button. Now imagine the same thing for a complete confirmation modal, a data table, or an entire screen layout.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you paste a YAML component into Power Apps?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Copy the YAML snippet (from a file, a repo, or a component library).&lt;/li&gt;
&lt;li&gt;In Power Apps Studio, open the &lt;strong&gt;Tree view&lt;/strong&gt; and select the screen (or container) where the component should go.&lt;/li&gt;
&lt;li&gt;Paste with &lt;strong&gt;Ctrl+V&lt;/strong&gt; (Cmd+V on Mac).&lt;/li&gt;
&lt;li&gt;Studio instantiates the controls. If a control version differs from your environment, let Studio auto-upgrade it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it — no import wizard, no solution packaging, no component library setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common pitfalls (and how to avoid them)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;French/localized environments use semicolons.&lt;/strong&gt; Power Fx separates function arguments with &lt;code&gt;,&lt;/code&gt; in English locales but &lt;code&gt;;&lt;/code&gt; in French and several other European locales. YAML written for an EN environment will throw formula errors in an FR environment. Fix: keep two variants of your snippets, or convert separators before pasting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Native control versions differ per environment.&lt;/strong&gt; Wrappers around native controls (date pickers, combo boxes) reference a control version like &lt;code&gt;GroupContainer@1.3.0&lt;/code&gt;. If your environment runs a different version, accept Studio's auto-upgrade prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Names must be unique per screen.&lt;/strong&gt; Pasting the same component twice auto-renames controls (&lt;code&gt;Button1_1&lt;/code&gt;), which can break formulas referencing them by name. Prefer components whose internal references are relative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not everything serializes.&lt;/strong&gt; Data source connections and some component-library references don't travel through the clipboard — YAML components work best as pure UI + Power Fx logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to find ready-made YAML components
&lt;/h2&gt;

&lt;p&gt;You can build your own snippet library in a Git repo — that alone is a big win for teams. If you want a head start, &lt;a href="https://www.powerblocks.dev" rel="noopener noreferrer"&gt;PowerBlocks&lt;/a&gt; is a curated library of copy-paste ready Power Apps YAML components (modals, forms, navigation, tables, cards), each with EN/FR locale variants and usage instructions. The &lt;a href="https://www.powerblocks.dev/library" rel="noopener noreferrer"&gt;component library&lt;/a&gt; includes free components, and the site also ships free developer tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an &lt;a href="https://www.powerblocks.dev/tools/expressions" rel="noopener noreferrer"&gt;Expression Cheatsheet&lt;/a&gt; covering Power Apps functions with EN/FR examples,&lt;/li&gt;
&lt;li&gt;an &lt;a href="https://www.powerblocks.dev/tools/color-picker" rel="noopener noreferrer"&gt;RGBA Color Picker&lt;/a&gt; that outputs ready-to-use &lt;code&gt;RGBA()&lt;/code&gt; formulas,&lt;/li&gt;
&lt;li&gt;an &lt;a href="https://www.powerblocks.dev/tools/icon-library" rel="noopener noreferrer"&gt;Icon Library&lt;/a&gt; with copy-ready &lt;code&gt;Icon.Name&lt;/code&gt; expressions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this matters for Power Platform teams
&lt;/h2&gt;

&lt;p&gt;Copy-paste YAML turns canvas app UI into &lt;strong&gt;code you can govern&lt;/strong&gt;: store components in a repo, review changes in pull requests, enforce a design system through shared snippets, and onboard new makers with a paste instead of a tutorial. For solution architects, it's the missing link between low-code speed and pro-code discipline.&lt;/p&gt;

&lt;p&gt;If you've been maintaining screenshots-and-instructions documentation for your team's UI patterns, replace it with a folder of &lt;code&gt;.pa.yaml&lt;/code&gt; files — your future self will thank you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Do you already version your canvas app components as YAML? I'd love to hear how your team handles reuse across environments — drop a comment.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>powerapps</category>
      <category>powerplatform</category>
      <category>lowcode</category>
      <category>yamlcomma</category>
    </item>
  </channel>
</rss>
