User management

Hi guys,

I am building an employee management application where I need to assign a role to the user during registration.

How can I assign an role to an specific user  using an radio button.what to assign in radio button for granting permissions to user.Help me for this functionality.

Please provide sample .oml

see attachemnts

user mgt.PNG

Solution

I have given other names of the roles I have currently but the instructions I am giving you can change for your roles.

You can create a static where you will have all the roles you need to do all your operations. I am creating a static for you to not compare or use hardcoded values.

After that, you just need to pass to the radio group the variable that has a identifier of type Role (name that I give to the static). 

Why? Because when you click on one of the radio buttons you will get the value clicked of the static.

After that when you save, you just need to grant the role for the user that you are creating.

But for your case. you need to create first the user, and then after you have created the user you need to get the id of the user that was created and put in the input of the grant role action.

Please try to do things step by step, if you have any doubts, please question.

Kind Regards,

Márcio

Hi Marico,

Plz provide me an .oml of this

Its Márcio hahaha

But here you have the OML.

Let me know it helps. Right now on the OML, I am not giving you upon registration, but you have a clear way of replicating the logic for your action to register the User. Dont forget that you will need to create first the user and then you need to pass the user id created.

Kind Regards,

Márcio

assignrole.oml

thanks it helps me


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.