Rules for updating repeaters not working

repeater-widget

#1

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)


Repeater Filter
#2

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

regards
AT


#3

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:


#4

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.


closed #5

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