This section allows for the filtering of data in views to particular users or groups of users. The objective is to pre-filter the data available in a view to a particular set of users based on some criteria. This is explained by way of an example. Currently, data is being collected at monitoring stations and being transmitted directly to the OKACOM server where it is automatically loaded into the database. An example of this is the survey "Monitoring station verification - download" and the view "Monitoring data - Level". This view contains unverified monitoring data from Botswana and Angola monitoring stations. We wish to restrict access to the Botswana data to Botswana users, and Angolan data to Angolan users.


This is acheived by having a table which lists usernames and their member state to which they have access. This is a view in the database called vw_monitoring_sites_users with columns username and ms (ms contains the member state name). In the data view there is also a field called ms.



To add a Pre-filter click the Add Pre-Filter button and select the field in the view on which to filter the data. In this case it is ms. On the pre-filter table, select the the Values Table or View which holds the filter information. In this case it is the view vw_monitoring_sites_users. Select the field the data is to be filtered by, ms, and the field containing the user name, username. set Enabled to true. 


Once this is done, the data will be prefiltered by member state based on the currently logged in user.

Created with the Personal Edition of HelpNDoc: Easily create Qt Help files