How to filter views on "roles"? 1 form - 2 views

Basically… Have one form. On that form I have reader fields with unique users.

Then a readers-field with one role: [helpdesk].

The view displays ALL documents if you have that role.

I would like to display one view /using $$ViewTemplate/ with all created forms and also have one view that do NOT show (filters away) where userrole is helpdesk.

because one user should only see all documents in a “helpdesk”-view but work as a normal user and only see a selected few documents.

I have seen the @SetViewInfo([SETVIEWFILTER] but… to use that to filter a view?

I’d like to “filter” a view so that @IsNotMember(“[Helpdesk]”;@UserRoles) (or similar) works…

Any ideas??

Subject: RE: how to filter views on “roles”? 1 form - 2 views

If you embed a view and write a single-category formula, you can have it use an @If to return either a username, or “”, depending whether the current user is in the role.

It’s also possible to write a formula that selects which view to use in the embedded view, and this formula can also use @UserRoles, because you might not want the helpdesk view to be categorized.