Power Fx function
frm.Mode — Power Fx function reference
Read the current form mode.
Syntax
powerfx
Form.Mode
Examples
powerfx
frmEdit.Mode = FormMode.New
→ true / false
powerfx
If(frmTask.Mode = FormMode.New, "Create Task", "Edit Task")
powerfx
btnSubmit.DisplayMode = If(frmTask.Mode = FormMode.View, DisplayMode.Disabled, DisplayMode.Edit)
Common mistakes & gotchas
- Mode is a property, not a function. There is no FormMode() function.
- Mode is read-only and driven by whichever of NewForm/EditForm/ViewForm ran last — it cannot be assigned directly like frmTask.Mode = FormMode.Edit.
- FormMode is an enum (FormMode.New / FormMode.Edit / FormMode.View); comparing against a plain string like "New" never matches.
Related Power Fx functions
From Forms