PowerFX Toolkit

Generate PowerFX formulas for common operations. No more struggling to remember the exact syntax for Patch, LookUp, Filter, and 25+ other functions.

What is the PowerFX Toolkit?

The PowerFX Toolkit is a formula generator. You tell it what you want to do (e.g., "save data to SharePoint"), fill in your specifics (column names, data source), and it generates the exact PowerFX code you need.

Think of it as having an experienced Power Apps developer sitting next to you, writing formulas on demand.

The PowerFX Toolkit is free for everyone. No subscription required.

How to Use It

1. Go to PowerFX Toolkit

Navigate to PowerFX Toolkit and you'll see cards for each available function.

2. Find Your Function

Browse the cards or use the search bar. Functions have friendly names like "Save Data to Database" instead of just "Patch".

3. Open the Generator

Click on a function card to open its generator modal.

4. Fill in Your Details

Each generator asks for specific information:

  • Data source name
  • Column names
  • Values or variables
  • Conditions (for Filter/LookUp)

5. Copy the Formula

The generated formula appears at the bottom. Click "Copy" and paste directly into Power Apps.

Available Functions

Data Operations

FunctionWhat It Does
PatchSave data to SharePoint/Dataverse (create or update)
LookUpFind a single record matching conditions
FilterFind multiple records matching conditions
SearchText search across columns
RemoveDelete a specific record
RemoveIfDelete records matching conditions

Collections

FunctionWhat It Does
CollectAdd records to a collection
ClearCollectReplace all collection data
ClearEmpty a collection
First / LastGet first or last record
FirstN / LastNGet first or last N records
IndexGet record at specific position

Logic & Conditions

FunctionWhat It Does
IfConditional logic (if this, then that)
SwitchMultiple conditions (cleaner than nested If)
And / Or / NotCombine conditions
IsBlank / IsEmptyCheck for blank values
CoalesceReturn first non-blank value

Variables & Navigation

FunctionWhat It Does
SetCreate/update global variable
UpdateContextCreate/update screen variable
NavigateGo to another screen
BackReturn to previous screen

Text Operations

FunctionWhat It Does
ConcatenateJoin text strings together
ConcatCombine text from table rows

Performance

FunctionWhat It Does
ConcurrentRun multiple formulas simultaneously

Generator Examples

Patch (Save Data)

Tell it:

  • Data source: SharePointList
  • Record to update: ThisItem or Defaults(SharePointList) for new
  • Columns and values to set

Output:

Patch(
    SharePointList,
    LookUp(SharePointList, ID = varSelectedID),
    {
        Title: txtTitle.Text,
        Status: drpStatus.Selected.Value,
        DueDate: datDueDate.SelectedDate
    }
)

LookUp (Find One Record)

Tell it:

  • Data source: Employees
  • Condition column: Email
  • Condition value: User().Email

Output:

LookUp(
    Employees,
    Email = User().Email
)

Filter (Find Multiple Records)

Tell it:

  • Data source: Orders
  • Condition: Status = "Active"

Output:

Filter(
    Orders,
    Status = "Active"
)

The generators show multiple variations. For Filter, you'll see options with And/Or conditions, date ranges, and more.

If (Conditional Logic)

Tell it:

  • Condition: IsBlank(txtEmail.Text)
  • True result: "Please enter email"
  • False result: "Email is valid"

Output:

If(
    IsBlank(txtEmail.Text),
    "Please enter email",
    "Email is valid"
)

Set vs UpdateContext

Set creates a global variable (available on all screens):

Set(varUserName, User().FullName)

UpdateContext creates a screen variable (only on current screen):

UpdateContext({ShowPopup: true})

Use Set for data you need everywhere. Use UpdateContext for screen-specific state like showing/hiding popups.

Common Use Cases

Saving a Form

Use Patch generator with:

  • Defaults(YourList) for new records
  • LookUp() for updates
  • Map your input controls to columns

Loading User Data on Screen

Use LookUp generator with:

  • User().Email as the condition
  • Store result in a variable with Set

Filtering a Gallery

Use Filter generator with:

  • Your data source
  • Conditions based on dropdown or search input

Checking Validation

Use And generator with:

  • Multiple IsBlank checks combined
  • Wrap in If for showing error messages

Best Practices

Use Descriptive Names

When the generator asks for variable names, use clear ones:

  • Good: varSelectedCustomer
  • Bad: var1

Test in Power Apps

Copy the formula, paste it, then modify as needed. The generator gives you the structure - you tune the details.

Understand What You're Copying

Don't just blindly paste. The generator explains what each part does. Understanding helps you debug later.

Combine Functions

Real-world formulas often combine multiple functions:

// Filter + Sort
Sort(
    Filter(Tasks, Status = "Active"),
    DueDate,
    Ascending
)

Troubleshooting

Formula errors after pasting

Check that your data source and column names exactly match what's in Power Apps. Spelling matters.

"Cannot find name" errors

Make sure the table/list exists and you've added it as a data connection in your app.

Delegation warnings (yellow triangles)

Some functions don't work well with large datasets. The generator notes this where applicable.

The PowerFX Toolkit generates syntactically correct formulas, but you need to replace placeholder names (like "YourDataSource") with your actual data source names.

PowerLibs - 85+ Power Apps Components with Copy-Paste YAML Code