Autofilter
Last updated
Last updated
The Auto-Filter functionality dynamically filters data based on user-specific conditions, allowing tailored visibility of data for different users. This ensures that users only access relevant information based on their roles, permissions, or relationships within the system. Below is a structured guide to implementing Auto-Filter in your system:
To enable Auto-Filter, first create the necessary tables:
Factories Table: • Create a table named Factories. • Add a field, e.g. "Title" to represent the factory name.
Products Table: • Create a table named Products. Add two fields: • Factory: To associate products with a factory. • Type: To describe the product type.
Factory Users Table: • Create a table named Factory Users. • Add necessary fields, and enable the Login Table, to associate users with specific factories.
1. Navigate to Settings > Permissions.
2. Create a Client Type that will control data access for factory users.
3. Create a Connections
To enable Auto-Filter, configure connections between the tables:
Table slugs: • Add a Table Slug in the Factory Users table. Write the Factories table’s slug inside this input.
Main table slug: • Select the Factory Users table as the Main Table Slug. This will determine the base table for filtering.
Table slug: • Choose the Factories table as the related table for filtering.
Field slug: • Specify the field(s) from the Factories table that should be visible and filtered automatically. For example, enable the Title field.
4. Test Auto-Filter
Log Out as Admin: • Log out from the admin account.
Log In as a Factory User: • Use an account associated with the Factory Users table.
Observe Auto-Filtered Data: • Upon logging in, the user will only see data from the Factories table that corresponds to their assigned factory, based on the previously configured connection.
• Data Security: Ensures that users only access relevant and permitted data.
• User-Specific Views: Tailors the data view for each user, improving usability and clarity.
• Dynamic Configuration: Simplifies filtering by automatically applying conditions based on relationships and permissions.