Skip to content

Troubleshooting and Cheat Sheet

Troubleshooting

A tag prints nothing

The path doesn’t match the data. Check it step by step against the Data Reference:

  • Missing list index. form_submissions, elements, options, tables, groups, rows and fields are lists. Add [0], a search like [label='Robot'] or a loop [i].
  • Missing dot after ]. elements[0]options must be elements[0].options.
  • Wrong spelling or case. Field names are case-sensitive: currencyCode, not currencycode. Note that some fields use underscores (form_submissions, created_at) and some use camelCase (groupLabel, productProperties).
  • The search doesn’t match. Labels must match exactly, including capitals and spaces. The example form has Other accesories with one s. Search by id or slug to avoid this.
  • The value really is empty, for example a request field that wasn’t filled in. Use a fallback.
  • Hidden in the BoM. If a BoM table, group or row is missing, check its Hide in output settings in the BoM Builder.

A tag is printed as text in the output

  • The tag contains smart quotes (’) instead of straight quotes ('). Switch off smart quotes and retype the quotes. See Editor setup.
  • The tag uses double curly braces {{…}} or double quotes. Use single braces and single quotes.
  • The tag contains a space in a field name or a typo in the d. prefix.

”Missing [i+1]” error

Every loop needs an end marker:

  • Check that each [i] has a matching [i+1] with the same path.
  • For nested loops, add one end row per level, innermost first.
  • Check that the loop doesn’t start in the body and end in the header or footer.
  • In a horizontal (column) loop, every row with an [i] tag needs its own [i+1] tag in the next cell.

Rows are duplicated or in the wrong place

  • Two different lists are mixed in the same loop. Give each list its own [i] and [i+1] rows. See Rules for loops.
  • The [i] and [i+1] tags are in different table structures, for example the [i+1] tag is outside the table. Keep both in the same table.
  • A floating image or text box is inside the loop. Set it to In line with text.

The document can’t be generated or is corrupted

  • A showBegin has no showEnd (or hideBegin has no hideEnd).
  • Two formatters are nested instead of chained: add(20:sub(10)) must be add(20):sub(10).
  • A tag has a double colon: aggSum::formatN must be aggSum:formatN.
  • A tag contains double quotes. Use single quotes.

Numbers look wrong

ProblemSolution
516551 instead of 516,551.00Add formatN(2).
Wrong decimal or thousands separatorSet the document language with {o.lang=da-DK} (or your language).
A total shows NaNA value is empty or text. Add add(0) before aggSum, and check the path.
Long decimals like 43045.916666Add round(2) before formatN.
Excel ignores the cell’s number formatAdd formatN to the tag so Excel receives a real number.
A BoM price can’t be used in a calculationvalue is formatted text. Use rawValue[0] (option cells) or rawValue (subtotals and summary).

Dates are wrong

ProblemSolution
Time is one or two hours offDates are in UTC. Add {o.timezone=Europe/Copenhagen} (or your time zone).
Month names in the wrong languageSet {o.lang=…} for the document.
Weekday or month starts with a lower-case letterAdd ucFirst after formatD.

Images don’t appear

  • The tag is typed in the document text instead of the image’s alternative text (Word and Excel), or the src attribute (HTML).
  • The option has no image. Filter the loop with image!='' or drop the image.
  • The image URL isn’t publicly reachable.
  • The image is floating. Set it to In line with text.

A blank page at the end

A manual page break at the end of a loop is repeated after the last item. Use Page break before on the first paragraph of the repeated block instead. See Page breaks in loops.

Empty lines where content was hidden

showBegin/showEnd tags on their own lines leave empty paragraphs. Use drop(p) or drop(row) for single elements, or put the begin/end tags at the end or start of existing lines.

Cheat sheet

Quote

WhatTag
Quote number{d.id}-{d.revision_number}
Customer name{d.name}
Customer email{d.email}
Project name{d.configuration_name}
Date{d.created_at:formatD('DD-MM-YYYY')}
Valid until (+30 days){d.created_at:addD(30, 'day'):formatD('DD-MM-YYYY')}
Sales contact{d.user.name}, {d.user.email}
Total excl. VAT{d.conf_total:formatN(2)} {d.currencyCode}
VAT{d.vat_total:formatN(2)} {d.currencyCode}
Total incl. VAT{d.conf_total:add(d.vat_total):formatN(2)} {d.currencyCode}
BoM grand total{d.form_submissions[0].form.bom.summary.rows[0].value}
Request field by slug{d.extra_fields[0].fields[slug='warranty'].value}
Current date{c.now:formatD('DD-MM-YYYY')}

Configuration

WhatTag
Configurator name{d.form_submissions[0].form.name}
Selected option of an element{d.form_submissions[0].form.data.elements[label='Robot'].options[0].label}
Value of an input element{d.form_submissions[0].form.data.elements[label='Software discount in %'].value}
Product property{d.form_submissions[0].form.data.elements[label='Robot'].options[0].productProperties.type}
Product image (alt text / src){d.form_submissions[0].form.data.elements[label='Robot'].options[0].image}

Loops

WhatTags
Repeat rows{d.list[i].field} … {d.list[i+1]}
Nested loop{d.a[i].b[i].field} … {d.a[i].b[i+1]} … {d.a[i+1]}
Filter{d.list[i, price>0].field} … {d.list[i+1, price>0]}
Sort{d.list[price, i].field} … {d.list[price+1, i+1]}
Distinct values{d.list[groupLabel].groupLabel} … {d.list[groupLabel+1]}
Object properties{d.obj[i].att} {d.obj[i].val} … {d.obj[i+1]}
Columns{d.list[i].field} │ {d.list[i+1]} in the next cell

Formatters

WhatTag
Number:formatN(2)
Round:round(2)
Date:formatD('DD-MM-YYYY')
Add days:addD(30, 'day')
Upper case:upperCase
Prefix / suffix:prepend('Q-') / :append(' kr.')
Line breaks (Word):convCRLF
Math:add(x) :sub(x) :mul(x) :div(x)
Sum of a list{d.list[].price:aggSum}
Join a list{d.list[].label:aggStr(', ')}
Store a value:set(c.name) then {c.name}

Conditions

WhatTag
Fallback text:ifEM():show('To be agreed')
Either / or:ifEQ('da'):show('Tilbud'):elseShow('Quote')
Remove row:ifEM():drop(row)
Remove paragraph:ifEM():drop(p)
Remove table:ifEM():drop(table)
Remove image:ifEM():drop(img)
Show block{d.x:ifEQ('y'):showBegin} … {d.x:showEnd}
Hide block{d.x:ifEQ('y'):hideBegin} … {d.x:hideEnd}

Options

WhatTag
Language{o.lang=da-DK}
Time zone{o.timezone=Europe/Copenhagen}
Shortcut{#bom = d.form_submissions[0].form.bom} then {$bom.summary.rows[0].value}