Power Fx function
UpdateContext — Power Fx function reference
Set screen-scoped variables.
Syntax
powerfx
UpdateContext( { Name: Value, ... } )Examples
powerfx
UpdateContext({locShowPanel: true})→ Scoped to one screen
powerfx
UpdateContext({locSortDesc: !locSortDesc})powerfx
UpdateContext({locStep: 2, locSelectedId: ThisItem.ID})Common mistakes & gotchas
- Context variables do not cross screens. Use Set or Navigate context for that.
- The single record argument can set several context variables at once, but each key becomes its own independent variable, not a nested object.
- Context variables reset when you leave the screen — pass them forward explicitly with Navigate's third argument if the destination screen needs them.
Related Power Fx functions
From App & navigation