Multiple select and Multiple form

HI, 

  i want to add multiple department  to employee and each department has multiple roles in single screen . How can i perform it . 

Hello Rahul,

You can use many to many relationship to solve your problem.

Refer below link for more information https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Entity_Relationships/Create_a_Many-to-Many_Relationship

On screen you have to give privilege to add department then roles associate to it. 

I will share sample oml for the same

Thanks & Regards

Prajakta Roshankhede

Solution

Hi Rahul,

You can create a block for this. In block you can have pair of dropdown. One for Department and other for role in that department.

Use this block inside a list on your screen and set its source to a local variable of list type. Type of this list can be a structure or entity you have created for many to many relationship.

You can have one button on your screen for adding one more such block in screen for selecting department and role combination.

In your block you can create an event to pass the selected department & role values to screen which you can manage in the list for saving in table upon save button click.

There will be few more scenarios which have to manage. You can manage or ask them here while implementing.

Solution