Although most expressions used in a Document Generator template are being validated, currently, there still is a list of expressions or blocks of text that are still not validated by the validator, either because of Office API limitations or because they are still in development, but have no planned release.
JavaScript Expressions
For many reasons and security concerns, in the current release of the Add-in, JavaScript expressions are not yet validated, and as such everything that is inside a script expression (declared like so %{...}) is also not validated.
// This expressions have JavaScript in their composition and, as such, they are not verified by the validator %{( new Date()).getDate() + "/" + (( new Date()).getMonth()+ 1 ) + "/" + ( new Date()).getFullYear()} %{( '${Focus}' .length > 0 ) ? 'Focus: ${Focus}' : 'Focus not Available' } // Comparisons used inside if-statements are not validated, but their general structure still is #{if (%{<Javascript>})} CONTENT #{end}
Functions Parameter
Values used as function parameters, everything that is inside the parenthesis in most cases, are not yet validated. However, the general structure of a function is being validated.
// Here the "NotValidated" expression wont be verified but an error will be shown after the ":" ${dateformat(VotValidated):} // The values inside the function are not validated, but an error will still be shown because we are missing another value after the comma ${set(NotValidated, NotValidated,)}
Filters and Property Values
In iterations, the values used in filters that you can possibly use together to make more complex templates are not being validated.
// After the "|" character, the values that come after an equals sign will not get validated #{for n=LinksCount|filter=%{<Javascript>}} Content here #{end}
Iteration Indexes
At the moment the validator does not validate if a variable used in an iteration was declared or not.
#{for n=ComponentsCount} ${Components[n].Name} // The variable used here should be "n" instead of "l" ${Components[l].Description} ${fullname:Components[n].Lead} ${Components[n].Id} ${Components[n].ProjectId} // The variable used here should be "n" instead of "l" ${Components[l].AssigneeType} #{end}
Contents Inside Certain Office Objects
Because of multiple Office API limitations, Text Boxes and Shape objects are currently not yet validated by our validation tool. Headers and footers are also not validated but its validation is already in discussion and should be included in a future release.
Table of Contents: