On Load of app check to see if authorized

I am putting a long formula on ALL my views so that only people who meet the in(lookup and In(
conditions can see the view. The formula is the same for all my views. If I need to change the logic I have to change it on every view.
I would rather have this formula just be for the whole appโ€ฆso I can control when the app loads users can not see see ANY views if (the formula)
Is there a way to do that on the UX General Options ?

My formula is something like this:
OR(
IN(LOOKUP(USEREMAIL(), Allemps, EmpEmail, JobCode), LIST(โ€œtestโ€,MGRHR)),
IN(
โ€œCorpHRโ€,
SELECT(Users[Role],[Email]=USEREMAIL())),
)

0 3 215
3 REPLIES 3

Steve
Platinum 4
Platinum 4

Nope.

Consider creating a 1x1 worksheet and a table in the app atop it. The one column is both key and label; its name doesnโ€™t matter. The one rowโ€™s value can be anything (so long as itโ€™s not blank), as there will only ever be one row. Add a single virtual column to that table with your expression as the App formula. If the table is named TableX and the virtual column is named CanView?, you can set your Show if expressions to just ANY(TableX[CanView?]).

Great trick Steve. One can add more VCs if there are other tables needing different show_if conditions. I wonder what the performance impact could be - would it be faster?

Itโ€™s definitely faster than complex expressions everywhere. The downside is big, though: virtual columns only update when a sync occurs, not in real-time, so my proposal is only suitable for expressions that only rely on data that would only update with a sync as well (as appears to be the case here).

Top Labels in this Space