combobox with plus to add another dropdown

combobox with plus to add another dropdown

  

Hi dear readers,

I want to create a Combobox Dropdown with the option to add another one underneath it.

What I want to achieve is that a person can select something from the dropdown that is already there, as soon as the user has made their choice they get the option to add another dropdown under the existing one. 

This can eventually be done with multiple ways I think, But what I want to use is a plus located next to the Combobox.

I have attached a file that can make it more clear what I want to achieve.


Regards,

Stijn Klaassen

Solution

Make a local variable as a List of RoleId.

In your screen, have a ListRecords with that variable as data source. In the listrecords, put the dropdownlist.

On the + button, do a listappend to your list with an empty "record". If you do it on the ListRecords directly, an ajax refresh will be done automatically (you'll see the blue ajax refresh icon inside the listappend action icon)

Solution

Tim Timperman wrote:

Make a local variable as a List of RoleId.

In your screen, have a ListRecords with that variable as data source. In the listrecords, put the dropdownlist.

On the + button, do a listappend to your list with an empty "record". If you do it on the ListRecords directly, an ajax refresh will be done automatically (you'll see the blue ajax refresh icon inside the listappend action icon)


thx for the help.

Now going to try it