In this example we are going to create a policy to restrict all the operations on a Table for a specific Role.
Scenario: We have a table named TableA, one of the fields is Class and we have 3 different types of classes, we are going to create a policy to restrict the Role RoleClassA to do operations just with the records that have Class ClassA.
View of the form with the Role RoleClassA before creating the policy:
- Create a query.
Create an AOT Query that retrieves the records that the Role should have access, in this case we are using TableA as our main DataSource and we added a Range on the field Class with the Value ClassA.
Set the properties as shown in the image below:
View of the form with the Role RoleClassA after creating the policy: