By default, eForms Mobile Replicate sends every row in a table to every user. To ensure users only see the data relevant to them, you can implement User-Level Filtering.
This article is an extract from the Replicate Installation Guide (PDF). For full context and comprehensive references, please consult the complete manual.
How it Works
When a mobile user syncs their device, the eForms Mobile Replicate service checks their login email against a specific column in your SQL table. If the user’s email is not found in that row, the row is excluded from their sync.
Implementation Steps
To enable this filtering, you must add a specific column to the end of your SyncData tables:
| Column Name | Data Type | Content Format |
_userIds | NVARCHAR(MAX) or TEXT | A comma-separated list of user emails. |
Example Entry:
If a row should be visible to John and Sarah, the value in the _userIds column should look like this:
john.jameson@company.com, sarah.smith@company.com
Key Rules for Filtering
- Exact Match Required: The email addresses in the
_userIdscolumn must exactly match the email addresses used to log into the mobile app. - Empty Values: If the
_userIdscell for a specific row is null or empty, that row will be treated as “Public” and sent to all users. - Column Placement: Like other system columns,
_userIdsit should be added to the end of your table schema to maintain consistency.
Security vs. Convenience
While User-Level Filtering is excellent for reducing data clutter on devices, it is a sync-level filter, not a deep encryption method. For highly sensitive data, ensure your SQL permissions and server security are hardened as well.