Fori loop with boolean

Hi I am using the below code to create a table with a boolean. So if here are multiple reviewers once one checkbox is clicked there is an option for another reviewer to click the checkbox. But the issue I have is getting rid of the fori when the checkbox is unchecked as there is no trash can icon appears to delete it. So once is checked you can not undo it. Please let me know if there is a way to get rid of the additional rows created by the fori loop.

`
{% stripnewlines %}
{% newline %}
|----45%----
|:----5%-----:
|-----------#+
{% newline %}
| {% t “Engagement leader” %}
| {% input custom.eleader.check as:boolean %}
| {% if custom.eleader.check == true %}
{{ custom.eleader.check.updated_by.name }}
{% assign pwc_team_name = pwc_team_name | append:custom.eleader.check.updated_by.name %}
{% assign pwc_team_name = pwc_team_name | append:"|" %}
{% endif %}
{% newline %}
{% fori name in custom.reviewer %}
|{% t “reviewer” %}
| {% input name.reviewer as:boolean %}
| {% if name.reviewer == true %}
{{ name.reviewer.updated_by.name }}
{% assign pwc_team_name = pwc_team_name | append:name.reviewer.updated_by.name %}
{% assign pwc_team_name = pwc_team_name | append:"|" %}
{% endif %}
{% newline %}
{% endfori %}
{% fori name in custom.preparer %}
|{% t “preparer” %}
| {% input custom.preparer.[name] as:boolean %}
| {% if custom.preparer.[name] == true %}
{{ custom.preparer.[name].updated_by.name }}
{% assign pwc_team_name = pwc_team_name | append:custom.preparer.[name].updated_by.name %}
{% assign pwc_team_name = pwc_team_name | append:"|" %}
{% endif %}
{% newline %}
{% endfori %}
{% newline %}
{% endstripnewlines %}

Hi Dominic,

There is indeed no bin available for booleans, making it impossible to delete a row of your collection.

What I would suggest here is to make the first column a dropdown (preparere|reviewer). This you will always be able to delete lines of your collection.

Regards,

Michiel

1 Like

Perfect that works! Thanks Michiel for your quick reply.