Clint,
This code works for me:
Code:
if eval_valid("session.org_id") ' session.org_id exists
if (session.org_id <> "") ' value exists
If (session.__protected__SecurityLevel <> 7)
tmpl.DBF.filter = "Organization_Id=\""+session.org_id+"\""
tmpl.SearchField_Info[1].DropDownBox.Filter = "Organization_Id=\""+session.org_id+"\""
tmpl.DetailField_Info[1].DropDownBox.Filter = "Organization_Id=\""+session.org_id+"\""
end if
end if
end if
SearchField_Info[1] is your searchfield indexed by a number. You can lookup the number in the xbasic of your component. You insert the code in the a5w page which contains the component.
In my case I only display records of a certain organization where the logon user is attached to. Except when this user has security level =7. In which case this user can see and search all records for all organizations.
regards, Ron
Bookmarks