By using User Attribute in AML, you can mask the data you don't want your users to see, or manipulate how the values will be returned based on User Attribute setup of the current logged in users.
Please follow our examples below to understand more how it works:
- Hide user emails if staff level is not Executive or Regional Manager
- Display field values based on User Attributes
Hide user emails if Viewers and Explorers dont't belong to Executive or Regional Manager teams
You only want to display sensitive info such as user emails to the Viewers/Explorers who are in Executive or Regional Manager teams.
In this example, you will have Data Model
users as below
There are 3 main steps
- Create User Attribute Level and assign approriate level (Executive, Regional Manager, Staff, etc.) to each user
- Create custom field
email_censoredwhich only allows users who have Level assigned with Executive or Regional Manager to view, hide the original email field
- Test your setup
1. Setup User Attributes
You need to create User Attribute
level and set an appropriate level for each user.
CEO User Attributes
Staff User Attributes
In Data Model
users, create a new field
email_censored which only allows the logged-in users to see the email if 'Executive' or 'Regional Manager' matches one of the values in their User Attribute
level. Then hide or delete the original
admin_email field, so Explorers or Viewers won't be able to access it.
Finally, test your setup in your datasets and dashboards using View and Edit as feature.
Normal staff's view
Display field values based on User Attributes
Default GMV is in USD, for users who are in Singapore you want to show GMV in SGD, and for users who are in Vietnam you want to show GMV in VND.
Firstly, set up User Attribute
currency for each user in User Management
Then, in your Data Model or Dataset, create a new field
Localized GMV which returns appropriate GMV value according to the currently logged in user's User Attribute
Test your logic with Edit and View as feature