Repeater Question

Hello-

First post here :slight_smile:

I am working on a prototype but ran into a problem with a repeater. I attached a very simplified version of what I am trying to do.

What I am trying to do:

  1. When I click the button (Test_Button)
  2. if row “Active == 'true” set text on “Test_Text” == Repeater.Text

Essentially I am trying to use an external button to trigger moving the repeater data from a specific row into a text field.

Thanks again for the help!

Repeater_Test.rp (51.2 KB)

See this update:
Repeater_Test.rp (82.8 KB)

I copied your widgets to Page 1 and created a way to do what you want. The trick with repeaters is that if you trigger an event for a widget in the repeater, it will happen for every row, from first to last. So, if you want to do something to or based on only certain row(s) you need a condition to test each row against a target–like if the “Active” column == “true”. To do this, your external button moves the rectangle widget in the repeater (by (0,0) so no real movement, just a way to trigger an event). When the rectangle widget’s OnMove event is triggered, it tests the value in that row’s “Active” column and if it is “true” it sets the text on the “Test_Text” widget to the value in that row’s “Text” column.

Another way to do this is to use the “update repeater row” action and let the repeater’s OnItemLoad event handle this. For this to work based solely on an external button, each row’s “Active” column would need to be set to “false” (or actually anything other than “true”) because whenever the value is “true” it will immediately set the text on the external widget. To demonstrate this better, I added a listbox widget to select any of the rows in the repeater, then the button updates the rows to mark the selected number’s corresponding row as “Active = true”. To make sure only one row is “active” I first set each row’s “Active” column to “false” and then only one row to “true”.