Use case
Restrict the users who can see the value of a calculated field according to their usernames, project roles or groups.
A conditional operator will be used to display only the values returned by a custom expression if the current user meets a definite criteria.
Configuration
Create a new Calculated Field (by JWT) custom field and name it appropriately. For the following example, we will use a Calculated date-time field.
Providing a description will help you to identify the purpose of the custom field.
Parser expressions
Make the field value visible only to a static set of users
%{system.currentUser} in ["username1", "username2", "username3"] ? (my_expression) : null
Make the field value visible only to users in project roles
isInRole(%{system.currentUser}, "role1, role2, role3") ? (my_expression) : null
isInRole(%{system.currentUser}, "role1, role2, role3")
.Make the field value visible only to users in groups
isInGroup(%{system.currentUser}, "group1, group2, group3") ? (my_expression) : null
!isInGroup(%{system.currentUser}, "group1, group2, group3")
Display format
Format type
Choose Date Time Picker
Add the field to the relevant screens.
Remember: All calculated fields are read-only and cannot be manually updated.
Related use cases
If you still have questions, feel free to refer to our support team.