OK, then this can be relatively straightforward. I’ll assume the list can vary in length and contains just a single word (but same approach would work with multiple words or numbers per row.) We can concatenate your repeater rows to a global variable, like OnLoadVariable, separating rows with a char that could not appear in the content, say like a comma. So a repeater like this…
…would result in a string of “,Ant,Bird,Cat,Dog” which is a valid value for OnLoadVariable. Every time a new row is added to the repeater, it would append its text value to OnLoadVariable. Then, on the second page, the OnPageLoad event could create a repeater by parsing the variable at the commas. Make sense?
Here is an example:
Pass Repeater with Variable Parsing.rp (84.4 KB)
A text field allows entering text. If spacebar or Enter pressed it triggers the “ADD TO LIST” submit button, which adds a row to the repeater with the value of the text field. Here is the code for the repeater:
and because the key part got clipped, here’s the last line:
Because I decided to have the repeater handle the OnLoadVariable string itself, it is critical to reset OnLoadVariable (to blank) for the first row. This method of handling the string in the repeater means that rows can be deleted and the OnLoadVariable string is properly updated. The order of entry is preserved as well.
When Page 1 loads, the OnPageLoad event first ensures that OnLoadVariable ends in a comma char (which simplifies the logic for creating repeater rows and properly ending when the list of row elements is done) and then calls a “list creator function” to iteratively parse the OnLoadVariable string. This “function” is a dynamic panel set to “Next wrap”. Each time it changes state, it adds a row to the repeater and removes the first word, then changes its state again until there are no more words in the list. This kind of recursive function works well for an iterative process like parsing a list of words.
To get the first element in the list, we can use this formula:
The slice() function extracts a string from OnLoadVariable, but does not alter OnLoadVariable. So, after adding a Row with this formula, I strip it out using this formula:
So, that’s basically it. Hope this approach works for you.