278
Views
2
Comments
(Reactive) Get User name in Expression
Application Type
Reactive
Service Studio Version
11.53.27 (Build 61662)

Hello, I am having troubles getting the Name of a user base on the User Id

I have an aggregate that retrieves data from many sources, there are two fields Created by and Updated by, which are User Identifiers, so in my table on the front side I am showing those Ids inside the table, but I want to show the Names instead, In reactive I can't use the GestUser(GetUserId()).User.Name in an expression, Is there another way to get the Name of the user Table based on the User Identifier in Reactive?

2020-09-21 11-35-56
Sachin Waghmare

Hello Rafael,

Please try the below links where you will find some suggestions for your problem.

https://www.outsystems.com/forums/discussion/64691/reactive-get-name-by-id/

https://www.outsystems.com/forums/discussion/61278/user-name-in-reactive-application/

Thanks & Regards,

Sachin

2024-10-07 06-43-19
Aanchal Sharma

Hi @Rafael Ceballos,

 I know this post is from 2022, but it remains unsolved. Therefore, I'm sharing my solution. To get a username by ID in an expression, there's no direct function available. However, you can achieve this by either adding the users table in your aggregate or, if that doesn't work for you, by creating a block instead of an expression. Within that block, you can retrieve the name. I have created an example of How to retrieve User's name by block.

below I attached the OML file

GetUserNameInExpression.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.