Search…
Resources
Related Links
user
To return the current or a specific user
There is not much to say about this function; it just returns the name or email of the current user. That's it. Wait, you can check if a specific user is using the database right now!
In combination with the field type "User" you can show specific records dynamically to a specific user.

Syntax

user()
user(string)

Return

user

Example

user() To return the current user.
user()
Result: Angela Merkel (if Angela Merkel is currently using the database)
​
user(myUsername) To return a user. There is no return if the given username doesn't match the name of any team member.
user("Boris Johnson")
Result: No return, i.e. an empty field (if Boris Johnson is not a team member)
​
user() = user("Angela Merkel") or user() = user("Emmanuel Macron")
Result: Yes (if the current user is Angela Merkel or Emmanuel Macron)
​
Choose the field "User" and select "Angela Merkel"
user() = 'Assigned to'
Return: Yes (with the User field "Assigned to" having the value "Angela Merkel")
If added in the field Readable if in a table editor, you'll only see the records assigned to "Angela Merkel" only in case you are Angela Merkel.

See also

​userEmail, which returns the type of platform that is currently being used.
​userHasRole, which returns the type of platform that is currently being used.
​userId, which returns the type of platform that is currently being used.
​userName, which returns the type of platform that is currently being used.
Last modified 8mo ago
Export as PDF
Copy link