Cheat Sheets/Power Apps/Set
Power Fx function

SetPower Fx function reference

Set a global variable.

Syntax

powerfx
Set( VariableName, Value )

Examples

powerfx
Set(gblUser, User().FullName)
Available app-wide
powerfx
Set(gblCartCount, CountRows(colCart))
powerfx
Set(gblTheme, If(Toggle1.Value, "Dark", "Light"))

Common mistakes & gotchas

Related Power Fx functions

From App & navigation

Used in these tutorials

← Back to the Power Apps (Power Fx) cheat sheet