Compare lists in access rules


I’ve a custom user property table set in the access rules.
This table contains a “Region” column, which is a ReferenceList.

In some other data table, I want a user to be able to select other users from the same regions.

But I can’t find a way to compare those two lists.

In pure python, I’ve compared the intersection of sets:

but this does not work.

I’ve tried other workarounds, but without luck. Any hints ? Thanks :slight_smile:


Hi @Yohan_Boniface

Acl rules don’t support this operation. You can try adding another formula column containing all users that are in that region, and then in ACL rules use the in operator. For example:

# Users column:
list(u.Email for r in $Region for u in Users.lookupRecords(Region=CONTAINS(r)))

# Acl formula
user.custom.Email in rec.Users

OK, thanks @jarek for the proposal :slight_smile:

I’ll deal with such workaround, then.

Is there a technical limitation to implement such feature ? If not, we may have a look at it.

Also, is there some documentation about the allowed syntax in ACL rules ? Or should I just go and look at the code ? :slight_smile:

Yes, this document describes what is allowed.
I don’t think there are any limitations to adding this feature. All ACL formulas are handled and compiled in this file, any improvements are welcomed :slight_smile: