# $restricted()
- Fully-restricted Fields
This keyword states that any field built with it can only be displayed to and edited by the user accounts belonging to the group(s) given as arguments to the keyword. Furthermore, these fields cannot be searched by users whose accounts don't belong to those groups. The use of this keyword is therefore more appropriate to scenarios involving sensitive data or data that we don't want to be visible in the search results.
# Usage:
$restricted(Group 1,Group 2,...)
# Examples:
The first screenshot included below show that the Salary
field of the definition named Employee
is built with the $restricted()
keyword and the argument FUNC HR ADMIN
:
$restricted(FUNC HR ADMIN)
In the second screenshot, we can see that because the account register_demo
has not been assigned to the aforementioned group, the user holding that account cannot neither access nor edit that field when creating or editing an instance of that definition.
After removing the$restricted()
keyword from Salary
, register_demo
can now see the field and also edit its value:
If, on the other hand, we want to maintain the field restricted to the accounts assigned to the FUNC HR ADMIN
group, but at the same time wish to make it visible to the user holding the register_demo
account, we can always assign that account to the FUNC HR ADMIN
group. To learn how you can add a user account to a given group, read this article.
The video included below consists in demo of the $restricted
keyword based on the examples of the screenshots included above: