918
Views
6
Comments
Solved
Reactive: Get name by id
Question

How do i get user name by id in Reactive? GetUser(GetUserId()).User.Name doesn't work in Reactive.

The Users API only have this: User_GetIdByUsername, is there something like User_GetNameById?

2023-04-07 07-55-02
Krushna Mantri
Solution

Krushana Mantri wrote:

Hi Benjamin,

You can get logged in User name by fetching the User aggregate with filter User.Id=GetUserId()

like below:

Hope this will help you

Regards,

Krushna

 Hi Benjamin,

To get the user by id you just need to add filter like in aggregate User.Id=Variable, it will give you the user name with that id

Regards,
Krushna

 

2021-04-09 11-42-43
assif_tiger
 
MVP

Hi Benjamin,
Try using the User_GetName server action from the Users module.


- Assif

2023-04-07 07-55-02
Krushna Mantri

Hi Benjamin,

You can get logged in User name by fetching the User aggregate with filter User.Id=GetUserId()

like below:

Hope this will help you

Regards,

Krushna

2023-04-07 07-55-02
Krushna Mantri
Solution

Krushana Mantri wrote:

Hi Benjamin,

You can get logged in User name by fetching the User aggregate with filter User.Id=GetUserId()

like below:

Hope this will help you

Regards,

Krushna

 Hi Benjamin,

To get the user by id you just need to add filter like in aggregate User.Id=Variable, it will give you the user name with that id

Regards,
Krushna

 

UserImage.jpg
Benjamin Cheok

Thanks Assif! But User_GetName returns current logged on user, it doen'st accept any input. I need to get name by Id (a variable).

2020-12-15 16-38-46
Michael Adams

We built our own function to retrieve the user name from a user id input.

UserImage.jpg
James Goodman

It's too bad that you got rid of a really useful action GetUser().  :-(  You've made for a lot more work.  I used this in Classic everywhere!!!!!!

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