Study guide
10.3 Power Automate Expression Language (WDL / Functions)
Microsoft Power Platform Functional Consultant PL-200
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Dataverse Tables, Relationships & Core Columns
1.1 Dataverse Table Types, Properties & Ownership 1.2 Table Relationships & Cascading Rules 1.3 Column Types, Formats, Primary Keys & Alternate Keys 1.4 Rollup, Calculated & Formula Columns with Power Fx
2 Chapter 2: Dataverse Data Management & Governance
2.1 Dataverse Search, Quick Find & Relevance Indexing 2.2 Auditing Configuration & Log Management 2.3 Duplicate Detection Rules & Settings 2.4 Bulk Record Operations, Data Import, Export & Templates
3 Chapter 3: Dataverse Security Model & Access Control
3.1 Business Units, Ownership Models & Modern BU Matrix 3.2 Security Roles, Privileges & Depth Levels 3.3 Teams Architecture: Owner, Access, and Microsoft Entra (AAD) Group Teams 3.4 Column-Level Security & Hierarchy Security Models
4 Chapter 4: Model-Driven App Fundamentals & Information Architecture
4.1 Model-Driven App Design, Site Map Navigation & Modern App Designer 4.2 Form Types: Main, Quick Create, Quick View & Card Forms 4.3 View Configuration, System Views, Personal Views & Filters
5 Chapter 5: Advanced Model-Driven App Components & Custom Pages
5.1 Custom Pages & Modern Commanding with Power Fx 5.2 Form Component Controls & Specialized UX Elements 5.3 Embedding Canvas Apps in Model-Driven Forms 5.4 Embedding Power BI Reports, Dashboards & Tiles
6 Chapter 6: Canvas Apps Structure, Formulas & Data Operations
6.1 Canvas App Architecture, Screens, Containers & Controls 6.2 Power Fx Formulas, Delegation & Data Source Limits 6.3 Variables (Context, Global), Collections & State Management 6.4 Triggering Power Automate Cloud Flows from Canvas Apps
7 Chapter 7: Power Pages Site Design, Navigation & Content
7.1 Power Pages Design Studio & Site Structure 7.2 Power Pages Templates, Styling & Responsive Layouts 7.3 Web Pages, Navigation Menus & Content Snippets
8 Chapter 8: Power Pages Data Integration, Forms & Web Roles
8.1 Power Pages Lists, Basic Forms & Advanced Forms 8.2 Table Permissions, Web Roles & Page Access Security 8.3 External Identity Providers & Authentication Configuration
9 Chapter 9: Power Automate Cloud Flow Fundamentals & Triggers
9.1 Cloud Flow Types: Automated, Instant, Scheduled & Desktop Overview 9.2 Dataverse Connector Triggers & Operational Filters 9.3 Standard Connectors, Custom Connectors & Connection References
10 Chapter 10: Cloud Flow Actions, Expressions & Logic Controls
10.1 Logic Controls: Conditions, Switches, Apply to Each & Do Until Loops 10.2 Variables, Data Operations & Dynamic Content Manipulation 10.3 Power Automate Expression Language (WDL / Functions) 10.4 Error Handling, Configure Run After & Scope Controls
11 Chapter 11: Business Process Flows & Guided Processes
11.1 Business Process Flow Architecture, Stages, Steps & Data Steps 11.2 Branching Rules & Multi-Entity Business Process Flows 11.3 BPF Action Steps, Workflows & Cloud Flow Execution 11.4 BPF Security Roles, Order & Process Lifecycle
12 Chapter 12: Classic Workflows, Business Rules & Modern Logic Extensibility
12.1 Classic Dataverse Workflows: Real-Time vs. Background (Async) 12.2 Business Rules: Scope & Actions 12.3 Low-Code Plug-ins in Dataverse: Automated vs. Instant 12.4 Troubleshooting Automations, Run History & Analytics
13 Chapter 13: Power Platform Environment Architecture & Security
13.1 Environment Types: Default, Sandbox, Production, Trial, Developer 13.2 Environment Governance, Groups, Routing & Capacity Management 13.3 Data Loss Prevention (DLP) Policies & Connector Classifications
14 Chapter 14: Application Lifecycle Management (ALM) & Solutions
14.1 Unmanaged vs. Managed Solutions & Solution Layering Mechanics 14.2 Solution Components, Dependencies, Publishers & Prefixes 14.3 Exporting, Importing, Upgrading & Patches 14.4 Solution Checker, App Checker & ALM Best Practices
15 Chapter 15: Enterprise Interoperability & Service Integration
15.1 Exchange / Server-Side Synchronization & Email Integration 15.2 SharePoint & OneDrive Document Management Integration 15.3 Microsoft Word & Excel Document Templates
16 Chapter 16: Copilot, AI Capabilities & Exam Strategy
16.1 Copilot Studio & Generative AI across Power Platform 16.2 AI Builder Prebuilt & Custom Models in Apps and Flows 16.3 PL-200 Exam Strategy, Time Management & Question Analysis
10.3 Power Automate Expression Language (WDL / Functions)
Key Takeaways Explain This Topic AI
Power Automate expressions use the Workflow Definition Language (WDL), evaluating functions, dynamic tokens, and literal values within action parameters.
The safe navigation operator '?' (e.g., body('Get_row')?['cr123_revenue']) prevents flow-crashing null reference exceptions when accessing optional or empty properties.
String functions (concat, substring, toLower, toUpper, trim, split, replace, guid) and Collection functions (first, last, length, empty, contains, union, intersection) provide robust manipulation without custom code.
Logical and comparison functions (if, equals, greater, less, and, or, not, coalesce) allow inline conditional evaluations and fallback value assignment.
Date/Time functions (utcNow, addDays, addHours, formatDateTime, convertTimeZone) handle timezone adjustments and ISO 8601 formatting critical for scheduled and enterprise workflows.
Last updated: August 2026
Power Automate Expression Language (WDL / Functions)
While Microsoft Power Automate provides an extensive visual designer with prebuilt dynamic content tokens, enterprise scenarios frequently require operations beyond basic token mapping: calculating future business dates, parsing complex text formats, evaluating inline ternary logic, coercing data types, and preventing null reference crashes. The underlying engine executes these calculations using the Workflow Definition Language (WDL) .
For the PL-200: Microsoft Power Platform Functional Consultant certification exam, you must master the syntax, function taxonomy, safe navigation operators, and execution rules of the Power Automate expression engine.
1. Workflow Definition Language (WDL) Architecture
WDL is the declarative expression language powering Azure Logic Apps and Power Automate cloud flows. Expressions are entered via the Expression Builder tab in the dynamic content pop-up or written directly into flow definitions. +-----------------------------------------------------------------------------+
- | WDL EXPRESSION SYNTAX ANATOMY |
- | |
- | @concat('Account: ', toUpper(triggerOutputs()?['body/name']), ' (', guid(), ')')
- | |---| |----------| |------| |----------------------------| |----|
- | Prefix Outer Func Inner Safe Navigation Token Scalar|
- | (JSON) Func to Trigger Body Column Func |
- +-----------------------------------------------------------------------------+
- Core Syntax Principles
Prefix Notation: Inside raw JSON definitions, expressions are prefixed with @ (e.g., @equals(...) ). When using the visual Expression Builder GUI, the leading @ is omitted.
Function Nesting: Functions can be nested infinitely (e.g., toUpper(trim(first(split(variables('FullName'), ' ')))) ).
Case Sensitivity: Function names are case-insensitive in WDL (e.g., utcNow() and utcnow() are identical), but property schema names and dictionary keys are strictly case-sensitive .
Action Name Formatting: When referencing action names containing spaces, replace the spaces with underscores (e.g., action Get customer record becomes outputs('Get_customer_record') or body('Get_customer_record') ).
The Safe Navigation Operator: ?
In enterprise flows, data payloads often contain optional columns or null values. If an expression attempts to traverse a missing property using standard bracket syntax (e.g., body('Get_row')['address1_city'] ), and body('Get_row') is null or missing the property, the flow runtime crashes with an unhandled NullReferenceException .
The safe navigation operator ( ? ) instructs the engine to return null rather than throwing an exception if the preceding object or property is undefined: // Unsafe (Crashes if contact is null or missing telephone1):
outputs('Get_contact')['body']['telephone1']
// Safe Navigation (Evaluates cleanly to null if property is missing):
- outputs('Get_contact')?['body']?['telephone1']
- triggerOutputs()?['body/telephone1']
- 2. Referencing Trigger & Action Outputs
- Function / Syntax Purpose Example Syntax
- triggerOutputs() Returns complete trigger output headers and body triggerOutputs()?['body/accountnumber']
- triggerBody() Returns the trigger payload body directly triggerBody()?['emailaddress1']
- outputs('Action_Name') Returns headers and body of a completed action outputs('HTTP_Call')?['statusCode']
- body('Action_Name') Returns the parsed body payload of an action body('Get_Account_Row')?['revenue']
- item() References the current element in an Apply to each loop item()?['primarycontactid']
- items('Loop_Name') References current item of a specifically named loop items('Apply_to_each_Order')?['total']
- variables('VarName') Retrieves current value of an initialized variable variables('varCounter')
- 3. Core WDL Function Taxonomy +-----------------------------------------------------------------------------+
- | WDL FUNCTION TAXONOMY |
- | |
- | +-----------------------+ +-----------------------+ +-----------+ |
- | | STRING FUNCTIONS | | COLLECTION FUNCTIONS | | LOGICAL | |
- | | - concat, substring | | - first, last, length | | - if | |
- | | - toLower, toUpper | | - empty, contains | | - equals | |
- | | - trim, split, replace| | - union, intersection | | - greater | |
- | | - guid, indexOf | | - take, skip | | - coalesce| |
- | +-----------------------+ +-----------------------+ +-----------+ |
- | | | | |
- | v v v |
- | +-----------------------+ +----------------------------------------+ |
- | | DATE & TIME FUNCS | | CONVERSION FUNCTIONS | |
- | | - utcNow, addDays | | - string, int, float, bool | |
- | | - addHours, addMinutes| | - json, xml, base64, base64ToString | |
- | | - formatDateTime | | - uriComponent, uriComponentToString | |
- | | - convertTimeZone | +----------------------------------------+ |
- | +-----------------------+ |
- +-----------------------------------------------------------------------------+
- 1. String Functions
- Function Signature & Behavior Example
- concat Combines two or more strings into one concat('EMP-', string(101)) --> 'EMP-101'
- substring Extracts characters: substring(text, startIndex, length) substring('PL-200 Exam', 0, 6) --> 'PL-200'
- toLower / toUpper Converts text casing toUpper('contoso') --> 'CONTOSO'
- trim Strips leading and trailing whitespace trim(' hello world ') --> 'hello world'
- split Splits string by delimiter into an array split('red;green;blue', ';') --> ['red','green','blue']
- replace Replaces all occurrences of substring replace('2026/08/17', '/', '-') --> '2026-08-17'
- guid Generates a new unique GUID string guid() --> 'c7a8b3e1-9d24-4e89-b12a-8f9210a5b4c3'
- indexOf Returns 0-based index of substring (-1 if not found) indexOf('admin@contoso.com', '@') --> 5
- 2. Collection & Array Functions
- Function Signature & Behavior Example
- first Returns the first element of an array or string first(body('List_rows')?['value'])
- last Returns the last element of an array or string last(split('doc_v2_final.pdf', '.')) --> 'pdf'
- length Returns item count in array or character count in string length(body('List_rows')?['value']) --> 45
- empty Returns true if array, string, or object is empty/null empty(triggerOutputs()?['body/websiteurl'])
contains Checks if collection contains item or string contains substring contains(variables('AdminList'), 'jsmith')
- union Combines two arrays/objects removing duplicate entries union(variables('TeamA'), variables('TeamB'))
- intersection Returns common elements present in both collections intersection(varRolesA, varRolesB)
- take Returns first N elements: take(collection, count) take(body('List_rows')?['value'], 10)
- skip Skips first N elements and returns remainder skip(body('List_rows')?['value'], 10)
- 3. Logical & Comparison Functions
Function Signature & Behavior Example
if Inline ternary conditional: if(expression, valueIfTrue, valueIfFalse) if(greater(variables('Score'), 700), 'Pass', 'Fail')
- equals Strict equality comparison returning boolean equals(triggerOutputs()?['body/statecode'], 0)
- greater / less Relational numerical/chronological comparison greater(item()?['revenue'], 500000)
- and / or / not Compound boolean logic evaluation and(equals(varTier, 'Gold'), not(empty(varEmail)))
coalesce Evaluates arguments left-to-right; returns first non-null/non-empty value coalesce(triggerOutputs()?['body/telephone1'], triggerOutputs()?['body/mobilephone'], 'No Phone')
Important
The Power of coalesce on PL-200: coalesce is the definitive WDL function for establishing fallback values when querying Dataverse lookups or optional fields. If a contact record has mobilephone populated but telephone1 is null, coalesce(body('Get_contact')?['telephone1'], body('Get_contact')?['mobilephone'], 'N/A') immediately evaluates to the mobile number without requiring multiple nested Condition or if() actions.
4. Date and Time Functions
- Function Signature & Behavior Example Output
- utcNow() Current timestamp in UTC ISO 8601 '2026-08-17T13:30:00.0000000Z'
- addDays Adds/subtracts days: addDays(timestamp, days, format?) addDays(utcNow(), 30, 'yyyy-MM-dd')
- addHours / addMinutes Adds/subtracts hours or minutes from timestamp addHours(utcNow(), -8)
- formatDateTime Formats ISO timestamp using standard .NET specifiers formatDateTime(utcNow(), 'MMMM dd, yyyy')
convertTimeZone Converts timestamp between standard IANA/Windows time zones convertTimeZone(utcNow(), 'UTC', 'Eastern Standard Time', 'yyyy-MM-dd HH:mm')
- ticks Returns 100-nanosecond tick count since 0001-01-01 (for date math) ticks('2026-08-17T00:00:00Z')
- 5. Type Conversion Functions
- Function Purpose & Input Type Example Conversion
- string Converts any scalar/object into string representation string(1050.50) --> '1050.5'
- int Converts string representation of number to 64-bit integer int('450') --> 450
- float Converts numeric string to floating-point number float('19.99') --> 19.99
- bool Converts string 'true' or 'false' to boolean bool('true') --> true
- json Parses raw JSON string into JSON object/array json('{"id": 1}') --> {"id": 1}
base64 Encodes string/binary into Base64 format (for email attachments) base64('Sample Text') --> 'U2FtcGxlIFRleHQ='
- base64ToString Decodes Base64 string back to plaintext base64ToString('U2FtcGxl...') --> 'Sample Text'
- 4. Complex Nested Expression Patterns for PL-200
- Pattern A: Extracting Email Domain for Dynamic Routing // Input: 'sarah.connor@cyberdyne-systems.com'
- // Expression: Extract substring after '@' and convert to lowercase
- toLower(last(split(triggerOutputs()?['body/emailaddress1'], '@')))
- // Evaluates to: 'cyberdyne-systems.com'
Pattern B: Calculating Dynamic Expiration Date in Local Time // Calculate due date 14 days from now formatted for US Central Standard Time
formatDateTime(convertTimeZone(addDays(utcNow(), 14), 'UTC', 'Central Standard Time'), 'yyyy-MM-dd')
Pattern C: Safe Conditional Full Name Construction // Build 'LastName, FirstName' if both exist, otherwise use whichever is populated
- if(
- and(not(empty(triggerOutputs()?['body/lastname'])), not(empty(triggerOutputs()?['body/firstname']))),
- concat(triggerOutputs()?['body/lastname'], ', ', triggerOutputs()?['body/firstname']),
- coalesce(triggerOutputs()?['body/lastname'], triggerOutputs()?['body/firstname'], 'Valued Customer')
- )