Power Fx function
ViewForm — Power Fx function reference
Put a form into read-only mode.
Syntax
powerfx
ViewForm( Form )
Examples
powerfx
ViewForm(frmEdit)
→ Read-only
powerfx
ViewForm(frmTask)
powerfx
If(!frmTask.CanEdit, ViewForm(frmTask), EditForm(frmTask))
Common mistakes & gotchas
- View mode is a display convenience, not a security boundary — inner controls can still be independently editable unless their DisplayMode is also tied to Parent.DisplayMode.
- ViewForm does not reload data from the source; it only changes how the already-loaded record renders.
Related Power Fx functions
From Forms