Filter table not working
Hi,
I'am trying to filter a table or view based on the logged in user.
tblorders, contains orders that are assigned to a user. The current user only has to see the records that are assigned to him. The tblorders has a column userid for this.
tblusers, contains the userdata, with the id column as the id of the user
I used the advanced security, where I selected the tblusers and the id collum as userid
For this I use the record selecting event:
// Recordset Selecting event
function Recordset_Selecting(&$filter) {
ew_AddFilter($filter, "userID = '".CurrentUserID()."'");
When logged in as the user with the id = 1, no records show up. The tblorders does contains records with the userid = 1.
Please help me into the right direction. Thx!