Wrong User being displayed?

Wrong User being displayed?

  

When i am using the expression: 

GetUsers.List.Current.User.Name

Its displaying a different user tot the one logged in? Its displaying a sample user which i don't know how to remove. Any Ideas?


Hi Jamie,


If you try this: 

GetUser(GetUserId()).User.Name


To return the user logged in you need to specify (with the "GetUserId()") what user you are refering to.

You can see the example that is used in WebBlock "LoginInfo". If you open the expression value that return the user Name you see that code in there.


Hope that this is what you need.


Best regards,

Ricardo


Ricardo Pereira wrote:

Hi Jamie,


If you try this: 

GetUser(GetUserId()).User.Name


To return the user logged in you need to specify (with the "GetUserId()") what user you are refering to.

You can see the example that is used in WebBlock "LoginInfo". If you open the expression value that return the user Name you see that code in there.


Hope that this is what you need.


Best regards,

Ricardo


Hi Ricardo, 


This has returned the error "Unknown function 'GetUser' in expression."


Can you show me a print?

And it's not GetUser. It's GetUserId()!

Thanks! ;)


This is what I have without errors:

Mine looks like this?

Ricardo Pereira wrote:

This is what I have without errors:

Mine looks like this:



If you expand that Entity (click in the left arrow) you see that will appear like mine!

When expand you will see that you have the "GetUser" inside.

You try to write directly "

GetUser(GetUserId()).User.Name

" in the expression box?

Ricardo Pereira wrote:

If you expand that Entity (click in the left arrow) you see that will appear like mine!

When expand you will see that you have the "GetUser" inside.

You try to write directly "

GetUser(GetUserId()).User.Name

" in the expression box?

Expanded, it does not look like yours?:

 and yeah I've tried just copying the expression directly


Solution

Oh, Ok! You're in Mobile!!


So, go to the aggregate an create a filter:

The expression still the same, but you're saying to the database that you want the user that is logged!


I'm sorry, I just see now that you are in mobile! My bad!

Solution

Ricardo Pereira wrote:

Oh, Ok! You're in Mobile!!


So, go to the aggregate an create a filter:

The expression still the same, but you're saying to the database that you want the user that is logged!


I'm sorry, I just see now that you are in mobile! My bad!

No its my bad, i should of mentioned! A million thank-yous!!! been scratching my head for a while on that one. 

You're welcome! We are all here to help each others! ;)


Best regards,

Ricardo