Here is the community post https://community.bpmonline.com/questions/lookup-field-filter
The filter should represent the query. Here is the example:
from lookup l
join LinkTable lt on lt.lId = l.Id
join SysAdminUnitInRole sau on sau.SysAdminRoleId = lt.RoleId
where sau.SysAdminUniId = CurrentUserId
If the filter doesn't work you can try to catch the request with sql server profiler and debug the functionality.
More details on how to create complex queries for filters can be found here: