Show or hide menu icons based on User role

Thank you so much.It is shared now with you;

Waiting for your repy.

Hey, I’m in, but I don’t see the ā€œUser Rolesā€ table we talked about anywhere here

I delete it because it caused a problem to my original app.This app is a sample made based on the original without the steps you have described.

Can you restore a copy of the app back when it had all the steps built in and share that one with me please?

Give me some time to apply your steps again and see what will happen

Have a look now:I have followed all the steps ,but got this error:

I fixed it, your Allowed Views and _allowedViews were configured as text, not enumlist of base text, that’s why you were getting that error.

Also you didn’t have a slice set up for that view.

Here’s the proof it works:

Hi friend;

Working as expected.I am very grateful for your valuable assistance.Thank you so much.

Marked solved

No problem, please mark the original answer as the solution so others that might have the same issue can find it easily among our many replies

I use another turnaround that works very well, even when it is somehow less clear.

It involves prime numbers and integer division (Modulo)

Let’s say there are some categories of menu items to which we assign prime numbers. Category of menues 2, 3, 5, 7, 11, etc.
And let’s assume that there is people that can see menu items numbered 2, other people: menu items numbered 5, etc. And even you can have people that can see items numbered 2 and 7 or 3, 7, and 11.

So the trick is to assign the multiplication of the item numbers that persons with some role can see, for example, there will be some users with role number 2 and SuperUsers will have number 2310 (=2x3x5x7x11).

To filter the slice of ā€œMy visible menu itemsā€ (i mean step 5 and 6 of @Rafael_ANEIC-PY post) the formula you need will be:

MOD( LOOKUP(USEREMAIL(), "ROLES", "emails", "Usernumber"), MenuItems[Number]) = 0

or whatever you have called these columns and tables.

A menu Item numbered 1 will be allways visible by everyone.

A menu Item numbered 6 will only be visible by those who have 2 and 3 in their multiplication.

This allows to have multiple groups of people allowed to see more than a group of menu items.