Can't do this anymore in the newer version. Any substitutes? both fields has requires=IS_IN_SET with multiple=True
{{=A('('+str(db((~db.pm.deleted_by.contains(user_id))&(~db.pm.read_by.contains(user_id))).count()) +')',_href='#',_class='mail')}} Searched around and found that it can be done this way: db.pm.like("%|"+str(user_id)+"|%") to look for the pipe char '|' and the sandwiched number. So maybe the above is not the conventional way of doing it but if the former is any faster, I would like to hear a solution. Please comment.