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
| Function | What It Does |
|---|---|
| Patch | Save data to SharePoint/Dataverse (create or update) |
| LookUp | Find a single record matching conditions |
| Filter | Find multiple records matching conditions |
| Search | Text search across columns |
| Remove | Delete a specific record |
| RemoveIf | Delete records matching conditions |
Collections
| Function | What It Does |
|---|---|
| Collect | Add records to a collection |
| ClearCollect | Replace all collection data |
| Clear | Empty a collection |
| First / Last | Get first or last record |
| FirstN / LastN | Get first or last N records |
| Index | Get record at specific position |
Logic & Conditions
| Function | What It Does |
|---|---|
| If | Conditional logic (if this, then that) |
| Switch | Multiple conditions (cleaner than nested If) |
| And / Or / Not | Combine conditions |
| IsBlank / IsEmpty | Check for blank values |
| Coalesce | Return first non-blank value |
Variables & Navigation
| Function | What It Does |
|---|---|
| Set | Create/update global variable |
| UpdateContext | Create/update screen variable |
| Navigate | Go to another screen |
| Back | Return to previous screen |
Text Operations
| Function | What It Does |
|---|---|
| Concatenate | Join text strings together |
| Concat | Combine text from table rows |
Performance
| Function | What It Does |
|---|---|
| Concurrent | Run multiple formulas simultaneously |
Generator Examples
Patch (Save Data)
Tell it:
- Data source:
SharePointList - Record to update:
ThisItemorDefaults(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 recordsLookUp()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.
