Syntax and Variables

  • Updated

Syntax

Syntax is the set of rules and principles that govern the structure of characters used to form code.

The key components of document coding syntax are:

  • Curly brackets (AKA moustache tags) - these {brackets} enclose variables and functions

  • Variables - specifies the type of information that will be generated from the database

  • Logic operations - operators are symbols that instruct the computer to perform a specific function with the data

 

Curly Brackets

The purpose of {curly brackets} is to enclose variables and logic operations. 

The software will treat the content inside of these tags as specific instructions that it will follow. 

 

Variables

Variables specify the type of information that will be generated from the database.

 

Writing Variables

In Athennian, variable names are written without spaces in between the words and using the camel case.

In camel case, the first letter of the first word in a variable name is lower case while the first letters of the following words are capitalized.

Examples:

{incorporationDate}

{waivedAuditor}

{fiscalYearEnd}

Variables are case sensitive; if you do not follow the proper syntax, your code will not work.

For example: if you type {Incorporationdate} instead of {incorporationDate}, the software will not recognize {Incorporationdate} as a variable and the document will not populate correctly.

 

Types of Variables

The two types of variables are Single Variables and Collection Variables (or Plural Variables).

 

Single Variables

Single variables are used to pull one specific piece of data from the database.

 

Example Code

Result

{entity_entityName}

Name of Entity

 

Collection Variables

Collection variables are used to specify which category of data you would like to pull information from.

Example Code

 

Result

 

{director_name}

Jessica Day

{#directors}{name}, {/}

Jessica Day, Winston Schmidt, Nicholas Miller,

The article Collection Variables and Loops goes over Collection variables in more detail.

 

Logic Operations

Logic operations instruct instruct the computer to perform a specific function with the data.

 

Example Code

 

Case

 

Result

 

{#waivedAuditor==true}This sentence will appear if the auditor has been waived.{/}{#waivedAuditor==false}This sentence will appear if the auditor has NOT been waived.{/}

The auditor has been waived.

This sentence will appear if the auditor has been waived.

The auditor has been not waived.

This sentence will appear if the auditor has NOT been waived.

The article Conditions: IF statements goes over Logic Operations in more detail.