Update rows by clicking widget in repeater

repeater-widget

#1

Hi experts!
What I am trying to do is, by clicking a button in repeater to update the repeater rows that meet some certain criteria. Such as the attached, I want to update rows column1 where [[item.column1==3]] to 100 by clicking the button in the row. But when I click the button in the first row, nothing happens , if clicking the other buttons in repeater, all rows will be updated. But if I click the button outside the repeater, I can achieve what I want to do.
Can anybody tell me where I did wrong? Thanks!

updaterows.rp (48.9 KB)


#2

Hi All, by referring to the post :Repeater Interaction does not work I think I knew where the problem is. You need a widget outside of the repeater to prevent it re-load itself.


#3

This is a very common mistake/misunderstanding. Certainly, your solution of using a button outside the repeater works, but if you need to do this–or anything like it–from within a repeater, it is possible.

In order to properly identify (target) rows in a repeater from within a repeater (the same repeater or another repeater) you need to be careful about using “Item.ColumnName” versus “TargetItem.ColumnName”. It can be tricky to explain and understand, but essentially, from within a repeater, the “Item” refers to “this row” (where “Item” equates to “row”, meaning the same row from which the action is triggered), and “TargetItem” refers to “the row to be acted upon” --or in other words, the row to be targeted. This doesn’t apply when the action is initiated from outside the repeater, because every row is simply just an “Item” …and every row can be a “TargetItem” as well–they can actually be used interchangeably.

See this updated file, where I simply changed “Item.” to “TargetItem.” on your repeater’s “Button” widget.
updaterows.rp (48.9 KB)


#4

Wow, Thanks!Your reply make things easier and my understanding about the repeater widget better.