Table Expression for Adds, Updates and Deletes - SWITCH

Hi, I am trying to work out a formula so that certain users have specific read/write access to a certain table e.g. “READ_ONLY”, “UPDATES_ONLY” etc.

Basically the users are kept in two tables (separate to the table I am setting this rule up for), I tried different variations of the SWITCH formula to get it to work as well as IF and CONTAINS but couldn’t get it to work.

Basically any user contained in Table 1 should be able to “UPDATES_ONLY”, while users contained in Table 2 will be able to “ALL_CHANGES”, all other users are “READ_ONLY”.

SWITCH(USEREMAIL(),
“Users From Table 1”, “UPDATES_ONLY”,
“Users From Table 2”, “ALL_CHANGES”,
“READ_ONLY”)

Any help would be much appreciated, thanks!

Try:

IFS(
  IN(USEREMAIL(), Table 1[Email]),
    "UPDATES_ONLY",
  IN(USEREMAIL(), Table 2[Email]),
    "ALL_CHANGES",
  TRUE,
    "READ_ONLY"
)

With appropriate substitutions for Table 1[Email] and Table 2[Email].

See also:





1 Like

Thanks Steve, that seems to have done the trick!

Much appreciated

James

1 Like