Delete row from Repeater, display remaining row count

I have a repeater with two rows in the data table. I have an icon in the repeater row that when clicked removes the row. I want to display a count of the remaining number of rows. I have the following interaction on a remove icon

Delete Rows
repeaterName this row

Set Variable Value
rowCount to “[[Item.Repeater.itemCount]]”

This returns the total number of items in the repeater’s data table (2), rather than the number of remaining rows after one was deleted.

I’m obviously doing something wrong, or I lack understanding of what the itemCount is supposed to return. Is there another way to have my rowCount variable display the number of remaining rows after one or many are removed.

1 Like

Hi @nebuleah,

One way to achieve this is to use a Local Variable in your expression for the Set Variable Value action.
Your expression would look something like this:


…where “LVAR1” is a local variable for your repeater.

Here’s what that would look like in the Edit Text dialog:

You could also use a Set Text action instead of a Set Variable Value action if you only want to display the value on another widget in the prototype.

Hope this helps!

Thank you for your help. This resolved my issue.

1 Like

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