Forum Academy Marketplace Showcase Pricing Features

How to remove a specific cell from RG that uses custom states

Continuing the discussion from How to add an 'Add New' button which adds a new row of inputs:

I am able to add a new row with the use of custom states.
However I am trying to remove a specific row however I am only able to remove the last row presently.

How can I achieve this without saving to the database?

Hey @ljrartlover

Cool feature you’re working on! Based on the feedback you received last time (I’m assuming you implemented that approach), you could probably use the current cell’s number or index as the value you would use to update the repeating group. So, you might ‘display list in repeatinggroup’ where the list is the repeating group’s list:minus item Current cell’s number.

Give it a try and don’t hesitate to reach out with any additional questions to [email protected]

Thanks much I got it to remove that specific row. The issue I am now having is with the Add room button. I can see that the ListofNumbers is increasing, but the additional rows are no longer adding to the RG
Here I have added rooms:

Here I have removed room 2 and clicked add room again:
image

However as you can see the room number at the bottom is still saying 3 (that is the value of the state.
Now I’m thinking I haven’t set up the list of number process correctly.

Here is my current workflow:
For add room button:
image

For remove a room button:
image
image