Foreign IDs in multilevel dynamic page template populating all rows

@NWonders it seems you’re missing an {% endif %} on the child_row condition

Also, you might want to try selectattr here. I think foreign ID columns might only be queried by ID? You’ll have to experiment with it a bit for that.

Something like this might work:

{% for child_row in child_rows|selectattr('foreign_id', 'eq', row.hs_id) %}
 <h6>
 {{ child_row.company_name }}
 </h6>
{% endfor %}

Best way to debug an error like this is to just constantly dump data onto the page to see what you get.