Allow Edit based on two tables references

Hello,

I am working in an app where I want the user to be able to edit a field based in the useremail.

Screen Shot 2022-09-06 at 10.21.14 AM.png

I want the app to allow edit rights to the columns Tier 1 Approval, Tier 2 Approval, Tier 3 Approval looking to the columns Division and Tier Approval on the following table were requests are recorded:

Screen Shot 2022-09-06 at 10.25.05 AM.png

For reference, there is this other table, were depending on the Division and Tier Approval in the previous table and if the user has the matching email, then will able to edit.

Screen Shot 2022-09-06 at 10.25.13 AM.png

Solved Solved
0 4 104
1 ACCEPTED SOLUTION

Hey. You can put something like this in the Editable? for Tier 1 Approval... etc...

AND(
[Tier] = ANY(SELECT(UsersTable[Tier],[Email] = USEREMAIL()))
[Division] = ANY(SELECT(UsersTable[Division],[Email] = USEREMAIL()))
)

 

View solution in original post

4 REPLIES 4

Hey. You can put something like this in the Editable? for Tier 1 Approval... etc...

AND(
[Tier] = ANY(SELECT(UsersTable[Tier],[Email] = USEREMAIL()))
[Division] = ANY(SELECT(UsersTable[Division],[Email] = USEREMAIL()))
)

 

Thank you, this did the trick.

Approaching the expression like the following would be more efficient, as it removes one of the two scans of the UsersTable table:

ISNOTBLANK(
  FILTER(
    "UsersTable",
    AND(
      ([Email] = USEREMAIL()),
      ([_THISROW].[Tier] = [Tier]),
      ([_THISROW].[Division] = [Division])
    )
  )
)

Even more efficiency could be gained by using a Current_User table:

Current User (Slice) | How to conform your app a... - Google Cloud Community

Thank you Steve, I tried the expression but for some reason I can't get it to work.

Top Labels in this Space