Multi-select list box in a repeater

Hi

I am trying to work out how to save unique repeater line entries, where one of the fields is a multi-select list box.

So for my user information I can get single fields like Name, Email, etc to work and I can add and delete rows. However I have a field where a user can be allocated multiple roles (selected from a list box)

How do I replicate this in Axure in a way that I can show an ‘Edit User’ functionality where I want to change allocated roles from a listbox?

Thanks!

A couple of recent threads should help.

That’s not quite what I am looking for.

I am looking for a multiple select widget in a single field (i.e. where you click multiple checkboxes from a list), along side single entry and drop down fields all linked to the same row in a repeater list

I’m not sure if this is even possible with repeaters?

Hi!

The bad new is that although you can set Axure’s listbox to allow for multiple selection, Axure offers no ability to get the chosen items. You can only get the chosen item when the listbox is in single-select mode.

Which means you’ll need to construct your own, fake listbox, which is pretty straightforward: create selected styles for each widget representing a list item, toggle selection on click.

One advantage is that the user won’t have know to hold down shift or control to multi-select.

But the big advantage in this case is that each line item in your fake listbox will be its own widget, for each widget you can have a dedicated column in the repeater’s dataset.

So, assuming this fake listbox is in the repeater…

On Click or Tap (of widget "role1" in fake listbox)
  If true
    Toggle selected of this
  If selected of this equals true
    Update rows set column "role1" to true for This
  Else if
    Update rows set column "role1" to false for This

(You would do this for each widget in the fake listbox.

And finally…

On Item Loaded
  If [[Item.role1]] equals true
    Select widget role1
  If [[Item.role2]] equals true
    Select widget role2

…etc. You won’t have to test the false case, because if you did not select them when you created the repeater row, they’ll stay that way unless you change them in OnItemLoaded.

Brilliant thank you!