Skip to main content

Automation on Headers, Footers and footnotes

How to Automate Headers Footers and Footnotes

You can add automated placeholders, conditions and operations to your headers, footers or footnotes.

Using our mark-up language, you will be able to customise headers and footers and footnotes with elements you would want in a document, such as a conditional text or a date.

Placeholders and operations

  • For placeholders you just need to include the placeholder text (your attribute) in brackets: [Placeholder].

  • You will need to make sure that the attribute already exists in your questionnaire

    If the placeholder is not in the document

  • You have to create a custom question using explanatory text:

  • e.g. [AttributeName]

Conditions

  • The functionality supports text inside conditions.

  • Uses this format for conditions: [IF:Condition]Text you want to be conditional[:FI]

  • If a condition has non-true/false options, slightly different markup language will have to be used. For example, if you want a condition to equal to Yes, you write the condition like [IF:Equals(YourAttribute, "Yes")]Your text[:FI]

  • These conditions can be nested and include placeholders within.

  • For conditions, you also need to make sure the condition exists in the document.

    How to write condition logic as plain text in Avvoka

    Equals(Attribute, "Yes"): [IF:Equals(Attribute, "Yes")]Your text[:FI]

    Equals(Attribute, "No"): [IF:Equals(Attribute, "No")]Your text[:FI]

    Equals(Attribute, "Option X"): [IF:Equals(Attribute, "Option X")]Your text[:FI]

    Present(Attribute): [IF:Present(Attribute)]Your text[:FI]

    Contains(Attribute): [IF:Contains(Attribute)]Your text[:FI]

    Equals(Attribute): [IF:Equals(Attribute)]Your text[:FI]

    NotEquals(Attribute): [IF:NotEquals(Attribute)]Your text[:FI]

    NotContains(Attribute): [IF:NotContains(Attribute)]Your text[:FI]

    If the condition is not in the document

  • You need to create it with an operation.

  • You can also do this where conditions are nested or too complex (to simplify what you need to write).

  • To do this, create a new operation in the operations tab and build the condition as you intend for it to work:

  • Next, export the document and edit the header/footer identically to how you would insert a condition, filling in the name of the operation and setting the value it equals to "true".

  • Satisfy the condition, and then export the document as a .docx to see the header:

Worked examples

  1. Simple "Condition" = Yes example: You will include: [IF:Equals(YourAttribute, "Yes")]Your text[:FI]

    If your questionnaire item related to your condition is answered with "Yes" then Your text will drop in. If not, this will not be included in your document.
    ​
    Example:
    ​


    ​

  2. Nested Conditions: Where you have a nested condition that you want to apply to a header or footer, you will first have to build it as an operation. When applying the markup language in the .docx, use the following format: [IF:Equals(Operation, "true")]Your text[:FI]

  3. Nested condition and placeholder: This will be the same as above, but replace the text with your placeholder like this: [Placeholder]. In the example below, we are using a date as a placeholder.

Coming soon...

A full editor for Footnotes, so that you can use Avvoka's intuitive and no-code automation builder to include this type of conditionality.

Did this answer your question?