Repeater Selected Item to Global variable


I have a repeater with 3 items:
Jane, Mary, Sandra.

I select the option Jane.
Can I pass the selection, the text itself (Jane) to a global variable value? (so I can later input that information into text fields and carry it on the next page).

Thank you


setGlobalVar(gvar, this.text)

1 Like

What about MULTIPLE items?

I have a repeater with rows that I mark selected onClick.

I want the values of the repeater to populate a textArea elsewhere.

So I guess, how do I add multiple “if selected” items from my repeater to a global variable?

Hard to mock up, and the prototype is a disaster right now, so can’t post. :frowning:
Thanks for any insight.

I DID find the attached. But I can’t figure out HOW to make the target populate with the selected items. I managed to replicate the “mark rows” in the appropriate repeater. But WHERE is there script to put that in the target field? #confusedSetTextMarkedRow.rp (56.9 KB)

Hi Kenn!

This might help a bit—I’ve edited the OnClick cases for the repeater rows so that when they are selected, their text is added to the global variable, and the global variable applies text to the rectangle. When the repeater row is deselected, the global variable changes its value so that the text that matches the specific value for that row is replaced with a blank space:

These conditional cases also update the text on the rectangle to show the new global variable value, without the now deselected repeater row’s text. Please note that in this case, I have removed the paragraph spacing between “This.text” and [[Item.Column0]] in the global variable and the rectangle, and instead made the rectangle that will contain the text small enough that the additional text values added will push onto the next line in the rectangle. This ensures that no additional paragraph spaces are visible from the rectangle as the value is replaced and updated.

SetTextMarkedRow_Edited.rp (56.4 KB)

Hopefully this helps some! :slight_smile: