Custom template

Hi @Stefan.Temelie,

Thank you for visiting the community and thank you for providing a clear and short example! Your first question is possible but it depends on when you would like to see the unreconciled tag. In case you want to see it when at least one of the questions is unreconciled, the following code can be a solution. You first loop over the collection to check whether all lines in the table are reconciled.

{% capture header_check %}|--57%--|--9%--|--3%--|--30%--+{% endcapture %}
{% capture check_options %}Yes|No|N/A|Not Known{% endcapture %}
{% capture questions_array2 %}Question1 |Question2|Question3
{% endcapture %}
{% assign questions_array2 = questions_array2 | split:'|' %}

{% assign value_indicator = 0 %}

{% for question in questions_array2 %}
  {% if custom.input2.[forloop.index] == blank and custom.dropdown.default == blank %}
    {% assign value_indicator = 1 %}
  {% elsif custom.input2.[forloop.index] == 4 and custom.commentsI2.[forloop.index] == blank %}
    {% assign value_indicator = 1 %}
  {% elsif custom.input2.[forloop.index] == blank and custom.dropdown.default == 4 and custom.commentsI2.[forloop.index] == blank %}
    {% assign value_indicator = 1 %}
  {% endif %}
{% endfor %}

{% stripnewlines %}
  |Show reconciled indicators here  {% unreconciled value_indicator as:indicator %}
  | 2nd question. dropdown here {% input custom.dropdown.default as:select options:check_options option_values:"1|2|3|4"  %}
{% newline %}
{{header_check}} {% newline %}

{% for question in questions_array2 %}
  |{% input custom.input2.[forloop.index] as:select options:check_options option_values:"1|2|3|4" default:custom.dropdown.default %} 
  |{% assign value_indicator = 1 %}
  |{% input custom.commentsI2.[forloop.index] as:text  placeholder:"Add note" %}
  {% newline %}
{% endfor %} 

{% endstripnewlines %}

Remark that it also contains a solution for your second question. There is a dropdown in the header which serves as a default for the dropdowns below. Note that if the dropdowns in the table itself are not blank, they no longer look at the default in the header.

I also want to point your attention to the name of the custom variables you are using. For the first question the name of the custom variable would be custom.input2.1, for the second one custom.input2.2. When you would like to delete the first question in the future, the second question becomes number one, however the naming in the database will not update! Questions and answers will no longer match.

A solution can be to create a sort of key array that can be used in your custom variable names. [This community post](CASE: array of questions with checks informs you on how to do this.

Kind regards,