getUserDisplayName() in UI builder dashboard

nouralthmal
Tera Contributor

Hi everyone,

 

I am trying to add in my dashboard a Hello, User rich text. I am using UI builder 

but how do I fetch current user name and display it in the dashboard? 

5 REPLIES 5

Kevin83
ServiceNow Employee
ServiceNow Employee

Can you bind to 

@context.session.user.displayName?

Screenshot 2025-01-24 at 8.41.55 AM.png

Thank you! yes I I used bind user.displayName but as html script and it worked

Keshav72
Tera Contributor

Hi @nouralthmal 

  • Select the Rich Text component.
  • Go to the Configuration section.
  • Select Label.
  • Choose the Data Bind option from the right-hand side.
  • Navigate to Page PropertiesUserDisplay Name, drag it to the free space, and click the Apply button.

    Please refer attachment for more details.

 

 

If you find my response helpful in resolving your query, please mark it as helpful.

Thank you!

Regards,
Keshav

Thank you!