Retrieving users

1
Hi friends, I am having an entity to which having association with account table. Now, I am using a reference selector, where I am retrieving all users. But, I am having a scenario in which I should get users except the logged in user. Could anyone can help me in how to write expression in XPath.
asked
4 answers
4

Try [id != '[%CurrentUser%]']. This will retrieve all the account exept the one of the current user.

Regards,

Ronald

answered
2

And make sure the account entity has at least readonly access for the targeted user role. Else the dropdown list will be empty.

answered
2

@ Asheesh

If you're showing entities directly related to the Account object in a dropdown, id='[%CurrentUser%]' only will not work. Try the following two options, both should work:

  • [YourModule.RelatedObject_Account = '[%CurrentUser%]']
  • [YourModule.RelatedObject_Account/Administration.Account[id = '[%CurrentUser%]']]

Hope that helps you out.

answered
1

I have similar requirement but I need to know the logged In user detail like User Id. and I am not finding '[%CurrentUser%] while using Xpath.

I have a requirement where I need to show the dropdown values related to particular user only. for eg if Database has some entries related to User1 and some entries for User2 then dropdown should show only related entries to the Users.

answered