This directory contains reusable Power Fx formulas, functions, and type definitions for use in canvas Power Apps App.Formulas property.
formulas/
├── collections/ # Inline table collections and data arrays
├── expressions/ # Named formulas, constants, and simple expressions
├── user-defined-functions/ # User-Defined Functions (UDFs)
├── user-defined-types/ # User-Defined Types (UDTs)
└── assets/ # Images and supporting files
Data collections that can be copied directly into App.Formulas for reference data.
| File | Title | Description | Difficulty |
|---|---|---|---|
| color-enum-in-named-formula.md | Color Enum in Named Formula | A collection of all 140 web colors for use in App.Formulas | beginner |
| icons-as-collection.md | Icon Enumeration to Collection | Converts the standard Icon enumeration into a searchable, filterable collection with metadata | beginner |
| error-kinds.md | Error Kinds Collection | A collection of all standard Power Apps error kinds for reference and handling | beginner |
| fxmenuitems.yaml | Menu Items Collection | A template collection for building custom navigation menus with role-based visibility | beginner |
Named formulas, constants, and simple expressions for common tasks.
| File | Title | Description | Difficulty |
|---|---|---|---|
| boolean-is-in-studio-mode.md | Are We in Studio Mode? | Determine if the app is running in Studio Mode (editing mode) to show/hide elements | beginner |
| code-comments.md | Consistent Code Comment Decor | Standardized code comment decorations for consistent documentation | beginner |
| control-constants.md | Helpful Constants | A set of standard constants for spacing, screen defaults, and control properties | beginner |
| doc-type-icons.md | File Type Icons | Generate URLs for file type icons based on file extensions | beginner |
| fxexp-allcontrols.md | All Controls Expression | A comprehensive table of all Power Apps controls with metadata | intermediate |
| fxrootsharepointurl.yaml | Root SharePoint URL Expression | Expression to extract the root SharePoint URL from the current user's profile | intermediate |
| top-of-app-formulas.md | Top of App Formulas | Table of contents and naming guidelines for App.Formulas | beginner |
Reusable functions with parameters that can be called from anywhere in your app.
| File | Title | Description | Difficulty |
|---|---|---|---|
| fxfindproportionalvalue.md | Find Proportional Value | Calculates a proportional value based on two related fractions | intermediate |
| screen-transition-random.md | Random Screen Transition | A function to return a random screen transition effect | beginner |
| regular-expressions.md | Regular Expressions Collection | A collection of common regular expressions with a UDF lookup function | intermediate |
Custom type definitions for structured data in Power Fx.
| File | Title | Description | Difficulty |
|---|---|---|---|
| user-defined-types-syntax.md | User Defined Types Syntax | Examples of defining custom types (records and collections) in Power Fx | intermediate |
| user-defined-types.md | User-Defined Types Examples | Comprehensive examples of UDT, Named Formulas, and UDF | advanced |
- Open your canvas Power App in Power Apps Studio
- Select App in the Tree view
- In the formula bar, find the Formulas property (or use
App.Formulas) - Copy the relevant formula code from these files into your App.Formulas
We recommend the following prefixes for organization:
| Type | Prefix | Example |
|---|---|---|
| Named Expression | fx |
fxWebColors |
| User-Defined Function | fxFun_ or fx...() |
fxFun_Calculate() or fxRandomScreenTransition() |
| User-Defined Type | fxTyp_ |
fxTyp_Customer |
- For UDFs and UDTs, ensure User-defined functions is enabled in Settings > Updates > Experimental
- Some expressions may require specific connectors (e.g., Office365Users)
| Date | Author | Changes |
|---|---|---|
| 2026-01-27 | Migration | Initial TOC and history section added |