I want to get the user role id or user role name when a user signed in to the platform Corteza

Hi, Can I know how to get the user’s role id or user role name when a user logged in to the Corteza application. I want to render some fields based on the user role.

Hey there!
Below is a guide to how you can render fields conditionally. You have access to the user as it is part of the variables. The roles is an array available in as user.roles[{index of the role you want}]. The roles are provided as an id.
Low Code configuration :: Corteza Docs (cortezaproject.org)

Please do know that you need to have a version of 2023.9 (2023.9.5) to test this out.

1 Like

Hi @emmyleke thanks for your reply, I will test this out.