Skip to main content
Adobe Employee
March 26, 2026
Question

Document Generation (Word): Inequality / negation in conditional-section inside repeating-section not working as expected

  • March 26, 2026
  • 0 replies
  • 5 views

Hello,

I am using the Document Generation API with a Word template, and I’m encountering unexpected behavior when using conditional-section inside a repeating-section.

The Template tags I am using in word doc:

{% repeating-section data.group_family.products %}

{% conditional-section expr(id = "soft_bundles") %}
Table 1
{% end-section %}

{% conditional-section expr(id != "soft_bundles") %}
Table 2
{% end-section %}

{% end-section %}

Sample JSON:

{
"data": {
"group_family": {
"products": [
{ "name": "Soft Bundles", "id": "soft_bundles" },
{ "name": "Product A", "id": "prod_a" },
{ "name": "Product B", "id": "prod_b" },
{ "name": "Product C", "id": "prod_c" },
{ "name": "Product D", "id": "prod_d" },
{ "name": "Product E", "id": "prod_e" }
]
}
}
}

Questions

  1. Is there a known limitation or special handling required for inequality (!=) or negation (not()) inside conditional-section when used within a repeating-section?
  2. In expr(...), what does $ or $.field refer to?
    • The current repeating item?
    • Or the root document?
  3. Can Word content control boundaries (e.g., conditional sections split across paragraphs or controls) cause different evaluation contexts, even if the template appears correctly nested?

Thank you!