Using string for "Icon" conditional visibility

Resolved

Hello Pros,

I have an icon that should be displayed based on a user role.

The users data model has a field of type string called role. We store ADMIN if this user should see specific menu items etc.. Because we have many roles we wanted to use this vs. BOOLEAN fields

We would like to somehow perform an "IF EXISTS users.role=ADMIN" THEN ELSE etc.. But cannot seem to solve it. Any tips or pointers?

Thank you for your help

2
10 replies