Rules for updating repeaters not working

I have a repeater with 2 columns, “client” (string name) and “selected” (a true/false boolean that if true, changes the component color to red just as an example test).

When i click on any repeater instance, it should update the “selected” column to “true”, for every instance that has the same “client”.

The action is:

But when i click in the component, it updates all the instances to true:
Feb-17-2020%2017-54-18

test.rp (48.8 KB)

Try with [[TargetItem.client == This.text]] <= this work for me

regards
AT

1 Like

It works, and its outrageous that it works. Axure does clearly not explain the difference between Item and Targetitem well in the documentation.

Thanks a lot for your help anh :slight_smile:

1 Like

Hi!

I try to think about Item vs TargetItem the same way as I think about This vs Target.

If the script containing the repeater command is owned by the repeater (e.g., it’s in the repeater’s OnLoad or OnItemLoad interaction), then use Item. If the script containing the repeater command is owned by a different widget (e.g., in a rectangle’s OnClick interaction) use ‘TargetItem’.

That said, I usually start off using Item, have it fail, and then say, “Oh crap, it’s TargetItem!”

Note that this doesn’t apply to filters. You always use Item in a filter, because it’s the repeater that “owns” the filter.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.