This allows the user to Manage records that belong to them.
-
The target table must contain a field that identifies the user (e.g, user_id).
-
In this example we’ll be using the following tables:
- Order table - is our target table.
- Users table - where all the users information reside (Note: this table is the one we use in Authentication process)
-
Create 1 field: user_id(INT) in Order Table.
- Click Manage Database Table.
- In Manage Database window at the left side, select the Order table.
- On the right side, you should see all the fields of that Order table, now click Add Field.
- Enter Fieldname: user_id and FieldType: INT.
- Click Save Changes.

-
Modify the Add Page of Order Module, and put a default value in user_id field to an ID of a logged-in user.
- Select Order.
- Select Add Page.
- Select user_id field, Checked the AddPage, Unchecked the EditPage.
- In the Control Properties, set the following:
- Display: none
- DefaultValue: –req.user.id–

Now everytime the logged user adds new data to the Order table, their id will be recorded.
-
Click User Record Management.
-
In User Record Settings window, select Order table and set the following:
- User Record Field: user_id (This is the user_id we created earlier in Order table)
- Matched User Field: req.user.id (This is the id in Users table)
- List User Records Only: Leave it as checked by default.

Now, let’s try our application, in this example i have my 2 users:
- User1 with the id=4
- User2 with the id=6

We’ll check if the specific user can only see his id in the user_id field record in the Order table.
As you can see, Users can only see their own encoded data.

