Steps 1 and 2 are ok when the filter is OFF. However, when I add the filter, step 1 fails and a row is not added. When I take the filter off, it works again.
I can get the desired behaviour by removing the filter in the onClick (just before the add row to Repeater 1). But I guess it would be good to know why the add row doesn’t work when there’s a filter applied.
There is no filter on Repeater 1, just Repeater 2. In addition, it’s not an issue with items being hidden, it’s that clicking on a visible item does not produce the desired behaviour.
Somehow (as I understand it), having the filter on is preventing the Add Rows to Repeater1 command.
I took a look at the file and I believe I see what is happening. OnClick of your repeater items in repeater 2, you are Updating the repeater row to have isSelected equal to True in one case, and moving the addFunction hot spot (which adds the repeater row to repeater 1) in a separate case. The action that adds a new row to repeater 1 seems to be relying on the value [[Item.Column0]] from the clicked row in repeater 2; the reason the row add seems to break when the filter is on is that when the repeater 2 Updates to set isSelected to True, the repeater is redrawn, and that row is filtered out before the “Move addFunction” action fires. When that action does fire, repeater 1 can’t find the row from repeater 2 to pull its data for adding the value from [[Item.Column0]].
It looks like moving the “Add Items” case in front of the “No conditions” case and making both “If” statements should help to keep the filter in place and add the rows. Hopefully that does the trick!
I had to read your reply a few times, but I finally understood on the third go.
Sorry I didn’t reply sooner, but I found a workaround by removing the filter and then applying it again immediately.
Is there documentation about when certain events occur? I seriously could not have thought that the redrawing would occur in the middle of an OnClick event. I think I may have committed other similar mistakes without ever finding out the cause. What would be useful is a list of common mistakes, such as this.
Anyway, this has been an eye opener. Thanks so much Alyssa.