Power Fx function
Len — Power Fx function reference
Count characters.
Syntax
powerfx
Len( Text )
Examples
powerfx
Len(txtCode.Text)
→ A number
powerfx
Len(txtBio.Text) & "/500"
powerfx
If(Len(Trim(txtPassword.Text)) < 8, Notify("Password too short", NotificationType.Error))Common mistakes & gotchas
- Len counts characters, not bytes, which matters when comparing against a byte-based length limit on some SQL nvarchar constraints.
- Len(Blank()) returns 0, the same as Len("") — Len alone cannot tell "nothing entered" apart from "field is blank".
Related Power Fx functions
From Text