Hello!
I have security filters where allows certain users to see or not to see certain data.
I have upgrade the App and after the upgraded the can enter the App, but canยดt see the filtering Data or any Data.
I add myself with a new the Gmail, log in and the same issue.
They use the App on a daily basis 24/7, what should I do to fix this?
What is the security filter expression?
OR(AND(IN([Status],SELECT(Usuarios y permisos[Status],[Email]=USEREMAIL())),IN([Torres],SELECT(Usuarios y permisos[Torre_1],[Email]=USEREMAIL()))),AND(IN([Status],SELECT(Usuarios y permisos[Status],[Email]=USEREMAIL())),IN([Torres],SELECT(Usuarios y permisos[Torre_2],[Email]=USEREMAIL()))),AND(IN([Status],SELECT(Usuarios y permisos[Status],[Email]=USEREMAIL())),IN([Torres],SELECT(Usuarios y permisos[Torre_3],[Email]=USEREMAIL()))))
Reformatted for clarity:
OR(
AND(
IN(
[Status],
SELECT(
Usuarios y permisos[Status],
([Email] = USEREMAIL())
)
),
IN(
[Torres],
SELECT(
Usuarios y permisos[Torre_1],
([Email] = USEREMAIL())
)
)
),
AND(
IN(
[Status],
SELECT(
Usuarios y permisos[Status],
([Email] = USEREMAIL())
)
),
IN(
[Torres],
SELECT(
Usuarios y permisos[Torre_2],
([Email] = USEREMAIL())
)
)
),
AND(
IN(
[Status],
SELECT(
Usuarios y permisos[Status],
([Email] = USEREMAIL())
)
),
IN(
[Torres],
SELECT(
Usuarios y permisos[Torre_3],
([Email] = USEREMAIL())
)
)
)
)
The [Status]
test is common to all AND() expressions, so we can restructure the expression to simplify and remove redundancy, and thereby gain some efficiency:
AND(
IN(
[Status],
SELECT(
Usuarios y permisos[Status],
([Email] = USEREMAIL())
)
),
OR(
IN(
[Torres],
SELECT(
Usuarios y permisos[Torre_1],
([Email] = USEREMAIL())
)
),
IN(
[Torres],
SELECT(
Usuarios y permisos[Torre_2],
([Email] = USEREMAIL())
)
),
IN(
[Torres],
SELECT(
Usuarios y permisos[Torre_3],
([Email] = USEREMAIL())
)
)
)
)
We can further reduce redundancy an increase efficiency by combining all the [Torres]
tests into a single pass through the table:
AND(
IN(
[Status],
SELECT(
Usuarios y permisos[Status],
([Email] = USEREMAIL())
)
),
ISNOTBLANK(
FILTER(
"Usuarios y permisos",
AND(
([Email] = USEREMAIL()),
IN(
[_THISROW].[Torres],
LIST(
[Torre_1],
[Torre_2],
[Torre_3]
)
)
)
)
)
)
And finally, roll the [Status]
check into the same pass:
ISNOTBLANK(
FILTER(
"Usuarios y permisos",
AND(
([Email] = USEREMAIL()),
ISNOTBLANK([Status]),
([Status] = [_THISROW].[Status]),
IN(
[_THISROW].[Torres],
LIST(
[Torre_1],
[Torre_2],
[Torre_3]
)
)
)
)
)
See also:
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |