Filter table based on another table field

SOLVED

Hi,

I need to filter table a based on field values in table b how would I do this? I need to filter a table based on the site access a user has in their functional profile without setting it on the object site field. I have tried the below.

######################################################################################

$FILTRE

#CRITERE = "[F:MTDH]FRMFCY = [F:AFF]FCY"

FILTSUP = "find([F:MTDH]TOFCY, GUSRFCY)<>0"

Return
######################################################################################

I tried the Global Variable but because some users have more than 128 sites i get an error