Using a droplist (or any kind of list) in a repeater

Hi, haven’t seen anyone mention this yet, and without thinking I’ve dug myself into this hole twice in the past couple weeks.

Is there any way to select options of a droplist based on repeater values?

Axure has an option to “Set selected option to” “Text on widget” in the “Set selected list option” section of the Case Editor, however it doesn’t seem to have any effect.

Apart from hacking my way around with that, all I can see is maybe creating a fake drop down with tables. That’s inelegant, and I’d rather not do it if I don’t have to.

Cheers!

1 Like

I’m not sure I’m following you. Could you give some more information?

I’ve managed to create a live search field that will display results in what looks like a dropdown box of cells beneath the search field. You can select one of these cells containing a search result to affect other widgets.

It seems like you could easily convert this to a widget that behaves like a dropdown box. I’m just not sure what you’re trying to accomplish yet.

Sorry about the vagueness in the first post. Reading back over it, I jumped straight to talking about what I’d tried to solve the problem, without properly outlining what the problem was.

It’s pretty simple.
Setting it up:
[ul]
[li]Make a new repeater.
[/li][li]Put a droplist widget in the repeater.
[/li][li]Throw some values in to the droplist.
[/li][li]Make a new column in the repeater dataset and fill it with values that match those you put in the repeater.
[/li][/ul]
The problem:
[ul]
[li]How do you get the droplist to display the values in the dataset?
[/li][/ul]

As I said before, it looks as though this isn’t possible directly.

So I tried:
[ul]
[li]Add a label widget to the repeater, hidden behind some other element.
[/li][li]Fill label widget with values from the dataset.
[/li][li]As the final action in the repeater’s onLoad interaction, add a “Set Selected List Option” in the case editor, targeting the droplist in the repeater.
[/li][li]Under “Set selected option to,” set “Text on widget,” and point it to the label widget.
[/li][/ul]

But… that doesn’t seem to do anything. In fact, I can’t really understand why that particular action sequence exists, since it doesn’t seem to be capable of affecting a droplist, even outside of a repeater.

So, failing that, I’m curious as to whether anyone has come up with a simple workaround, or if my only option is to build a fake droplist out of tables – or avoid the combination altogether.

Cheers.

That narrowing of search results you talk about isn’t really what I was after, however it sounds like a pretty sweet piece of work. I reckon a lot of people here would be interested to know how you achieved it.

1 Like

+1
I’m also struggling with the same issue.
Looks like a natural use case for repeater, I wonder why it’s not implemented directly in Axure…

Hi josefk, I think found a workaround that might help you -
I’m using a label on top of the DropDown, and update it’s value whenever the DD value changes.

Take a look: Untitled Document

Here is the RP: https://www.dropbox.com/s/9e9khqmx9axt1pr/Repeater%20with%20DropDowns.rp

Hope this helps :slight_smile:

1 Like

Also, here you can see an example of narrowing down search:
Global Search Control

:slight_smile:

Shiraluk,

I’m attempting to have a droplist show in a repeater. I see you have it implemented at Untitled Document. Due to security constraints here, I am unable to access dropbox. Would you be able to attach the file in this post or give me a nudge as to how you got it to work. I’m able to add rows, but every time I do, all the droplists reset themselves to the default.

Thanks,
Ann

1 Like

I’ll reattach the RP file, hope this helps :slight_smile:

Repeater with DropDowns.rp (208 KB)

2 Likes

Hi,
This is my first post and I’m not sure if I should be replying old posts or if I should be creating a new one but I will start here :slight_smile: I really hope you can help since my client is expecting to use my prototype soon,

I have created a similar repeater but with a custom dropdown using almost the same “code” as Shiraluk.

My issue is that when I click to add a new row the repeater row updates and gets blank. Sorry if I am vague but I hope it is clear when checking out my rp-file.

Thanks, Claes

Repeater w dropdowns.rp (118.1 KB)

Hi finn5fel,

You’re so close! The part you were missing was to edit the Add Rows interaction to give the rows being added some data. Currently, the Add Rows IX is adding empty rows to the repeater:

To resolve this, simply edit the entries under Text_1 and Text_2 to target a local variable, e.g. LVAR1, to reference the text on the “Title 1” and “Title 2” widgets . This will add rows to the repeater, pulling text from the widgets you are setting the text to (the droplist selections).

Lmk if you have any questions!

Repeater w dropdowns_EDIT.rp (117.6 KB)

2 Likes

Is there a reason why the droplist widgets in the default library don’t work with repeaters? Making a droplist using dynamic panels seems crazy when there’s one right there…

1 Like