Support Topics Documentation Slack YouTube Blog

If user has user role then go to page

Hello,

I am trying to go to a page based on the user role of that specific logged in user.
But when i use it like this it gives an 404 error message, can you guide me to the correct codeless solution?:

image

Hi Michel,

Have you verified that the 2_HoofdpaginaGV page exists in the same UI container?

Regards,
Mark

Hi Mark,

I am not sure, i only created pages and not containers.
See below:

image

Hi Michel,

What is your application ID? I’d like to see the problem for myself.

Regards,
Mark

Hi Mark,

Application ID = “30960D18-DC9C-C94C-FFD9-AECB1619B200”
Logic is in 1_inlogpagina

Hi Michel,

The problem is right here:

The page name doesn’t have the letter “d”

Regards,
Mark

Thanks Mark,

That was a mistake but didnt solved it completely. I made two users with different user roles.
But it doesnt matter which user role the logged in user has, it keeps going to the else statement.
I am sure i am doing something wrong but i cant find it.

The reason for this is you’re checking if the user roles contain variable that has the same name as the role name:

The variable is empty, it has no value. What you should do is instead of variable put text in there with the name of the role. Alternatively, you can put the name of the role into the variable.

Thanks Mark, that solved my problem!

1 Like