Basic repeater question, finding an item


#1

Hi all,

I’ve been desperately trying to find the answer to what seems like a simple question - how do I pull out a list of what’s in a repeater?

I have a set of repeaters, I want to pull from any of them a list of what’s in there. So, simple repeater with items “Apple”, “Orange”, “Banana”. Outside the repeater I want to be able to pull that list and put it into variables or something else like a textbox. But try as I might I can’t find how I reference that.

Just to be clear, there are 9 repeaters and the user can add a lot of content to them, and drag drop items between them, so I didn’t want to have to somehow try and use variables to track each list, as that will get horrendously complex. So instead I wanted to wait until the user has finished and then use a function outside of the repeaters to capture the state of each repeater list.

Set LVAR1 to the repeater, then what coding (fx) format do you use to reference items 1, 2, 3, etc. in the repeater?


#2

You’ll want to build a special function for this inside each repeater. You can then “call the function” from outside the repeater. Basically, you would be requesting each repeater to send its data somewhere–global variable, text value of widget(s) or even update another repeater to compile your list.

Here is a thread describing two methods to do this