Goal:
To guide users on how to use the DisplayName
property of the user
object to show the user’s full name rather than their login ID in forms or scripts.
Context:
By default, some systems may show the user’s login ID. To enhance clarity or user-friendliness, you may want to show the user’s Display Name instead. This can be done either directly in the Form Design or via Backend Script. The user
object contains multiple useful properties like:
UserName
DisplayName
FullName
FirstName
LastName
PhoneNumber
ProfilePictureUrl
Email
Steps / Instructions:
Method 1 - In Form:
-
Go to your Form Design in Studio.
-
Add or select a Text Field where you want to display the user’s display name.
-
In the Field’s Formula, enter:
- Save and preview your form.
- The field will now show the current user’s Display Name.
Method 2 - In Script:
- Navigate to the Script section of your flow or event.
- Use the following line to assign the display name to a field (e.g.,
Name
):
Backend Script:
- Save and run the flow.
- The specified field will now hold the user’s display name.
Tips / Notes:
- You can use other user fields as needed, such as
user.Email
oruser.FullName
. - These methods work for the currently logged-in user only.
- Always test your form or script to verify the output displays as expected.