Fields can be displayed or hidden based on the role of the user. For example, all users are allowed to view the Hire Date field in the Employees controller by default.
Let’s configure the field to only permit administrators to view the Hire Date field.
Start the Project Designer. In the Project Explorer, switch to Controllers tab. Double-click on Employees / Fields / HireDate field node.
Change the “Read” Roles property:
Property | New Value |
“Read” Roles | Administrators |
Press OK to save the field. On the toolbar, click Browse to generate the application.
Log in as user/user123%. Navigate to the Employees page. The Hire Date column will not be present in the view.
Log out, and log in as admin/admin123%. The Hire Date column will be visible again.