[_THISROW] in show if

Hi all,

I have this expression in a show_if:

OR(
IN(
USEREMAIL(),Projecten[Email_Site_Coordinator_1]),
IN(
USEREMAIL(),Projecten[Email_Site_Coordinator_2]),
IN(
USEREMAIL(),Projecten[Email_Site_Coordinator_3]),
IN(
USEREMAIL(),Projecten[Email_Site_Coordinator_4]),
IN(
USEREMAIL(),Projecten[Email_Extern_projectleider]),
IN(
USEREMAIL(),Projecten[Teamleaders]),
USERROLE()="Admin"
)

How do i change this with a [_THISROW]?

-Remco

0 3 235
3 REPLIES 3

Anyone? I want the the site coordinator and teamleaders only to see there own projects. now if your useremail is one of the colun values you see every project.

You might consider making a new table of site coordinators that references the Projecten table. This would:

  • eliminate the need for multiple columns for different site coordinators
  • provide more flexibility in the event that you need more than 4 site coordinators
  • better organize your data / database (see Database Normalization)

However, with your current database layout, I would suggest first constructing a single list of site coordinators so you can perform a single IN() statement check rather than needing one for each column. Also, this should be a security filter or slice filter on the Projecten table, so you do not need to specify the table name in the formulas (it is implied). Including the table name will select the entire list of projects, which is what is causing your error. The simplified formula should be

OR(
IN(USEREMAIL(),
   LIST(
      [Email_Site_Coordinator_1],
      [Email_Site_Coordinator_2],
      [Email_Site_Coordinator_3],
      [Email_Site_Coordinator_4],
      [Email_Extern_projectleider],
      [Teamleaders]
   )
),
USERROLE()="Admin"
)

Thank you for the explanation, this helps to be better in understanding the expressions!

About a new table: i couldnโ€™t agree more, the other parts of my app is organised in that way, the โ€œproblemโ€ here is dat this information is pulled with Google app script from a CRM system. I prefer to assign a Site coordinator once in the CMR system.

Top Labels in this Space