Athennian Coding Ref 1.3
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
$
%
123
 
 
 
 
 
 
 
 
 
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2
Athennian Document Coding Reference
3
4
5
FAQ
6
7
How to use sections
8
Sections are opened using the # symbol. They are closed with a forward slash / . The forward slash can be proceeded by the variable name for readablity - however this is optional. A section is opened in one of three cases.

1. Open if evaluated to a true value.
Example :
{#director_name === 'John Doe'} Print this if name is John Doe {/}
Else Example:
{#director_name !=='John Doe'} Do not print if name is John Doe {/}

2. Repeat a section against collection of data.
Example:
{#directors} {name} {/directors}

3. Repeat a section against a list of data. This is simular to a collection, however these lists are flat and dont contain sub variable names.
Example:
You can print a list such as {officesHeld} using dot notation. Example : {#officesHeld} {.} {/officesHeld}. ---> President Treasurer .
9
10
11
Using Filters:
12
Filters can be applied to an appropriate variable or collection to alter in order to better fit your documents needs.

A simple example would the upper case filter:
{entityName | upper}
Prints: PAPER LTS

The variable name followed by the pipe symbol and the filter name indicated a active filter. And entity name such as 'Paper Lts' would then print as 'PAPER LTS'.

There are much more complex filters that will calculate data across shareclasses or transactions. These more complex filters will often take a parameter. These follow the filter name and colon and must be in qoutes.
Example:
{transactions | sum:'numShares'}.

This filter accumalates every share within the list of transactions into one sum. You can combine filters, however it is important you use them in a logical order.
Example:
{transactions | status:'confirmed' | type:'issuance' | sum:'numShares'}

This will only print the sum of shares issued from a list of transactions.
13
Hot to use a section to conditionally print:
14
15
Using the variable Maps:
16
17
In document calculations:
18
Currently in-bracket addition and subtraction is supported. Example ---> {38 + 27} {variableName - otherVariable}
19
Troubleshooting:
20
Start small! Build out your documents gradually as you are learning. This way problems are easier to isolate. If a document isn't working, try to run the document in halfs until you locate the problematic code and work from there.
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Loading...