In this article, we will go over the standard coding patterns and best practices when coding an annual compliance document.
To begin, please upload the attached documents to Athennian (for assistance with uploading, please refer to our help center article Uploading New Document Templates for details).
Create a new Annual Compliance task and generate the documents within to learn more! Clicking the links below will download these documents to your downloads folder on your local drive.
- Annual Resolutions - Financials and Auditor
- Directors Annual Resolutions
- Shareholders Annual Resolutions
See the table below for a broken out explanation of the coding used in the above resolutions to increase your understanding of the code and allow you to manipulate the coding to use when coding your very own documents.
See detail of coding specifics below:
Pattern Name |
Code Snippets |
Code Explanation |
Entity (General) |
||
Entity Name |
{entities | grab:1:'entityName' | upper} |
|
Business Corporations Act for Canadian jurisdictions |
{#(entities | grab:1:’jurisdictionRegion’)=='Nova Scotia'}Companies Act{/}{#(entities | grab:1:’jurisdictionRegion’)=='Canada (Federal)’}Canada {/}{#((entities | grab:1:’jurisdictionRegion’)=='Manitoba') || ((entities | grab:1:’jurisdictionRegion’)==’Saskatchewan’)}The {/}{#((entities | grab:1:’jurisdictionRegion’)!='Nova Scotia') && ((entities | grab:1:’jurisdictionRegion’)!='Manitoba') && ((entities | grab:1:’jurisdictionRegion’)!='Newfoundland and Labrador')}Business Corporations Act{/}{#((entities | grab:1:’jurisdictionRegion’)=='Manitoba') || ((entities | grab:1:’jurisdictionRegion’)=='Newfoundland and Labrador')}Corporations Act{/}{#(entities | grab:1:’jurisdictionRegion’)!=’Canada (Federal)’} ({entities | grab:1:’jurisdictionRegion’}){/} |
Using conditional logic with comparison operators ‘==’, ‘!=’ to output correct act names. The content inside {#condition} ... {/} is executed if the condition is true, otherwise, it's skipped. |
Entity waived Auditor button is not checked |
{#(entities | grab:1:’waivedAuditor’)!=true} {/} |
|
Entity’s Next Annual General Meeting date |
____Version 1 _____ {#(entities | grab:1:’nextAGM’)!=’’}{entities | grab:1:’nextAGM’ | time:'MMMM D, YYYY'}{/} ____Version 2 _____ {entities | grab:1:’nextAGM’ | time:'MMMM D, YYYY'} ____Version 3_____ the shareholders of the Company hereby selects{entities | grab:1:'nextAGM' | time:'_MMMM D, YYYY'} as the annual meeting date for the Company; |
Version 1:
Version 2:
Version 3:
|
Entity Fiscal Year End date - Year Only |
{#(entities | grab:1:’fiscalYearEnd’)!=’’}{entities | grab:1:’fiscalYearEnd’ | time:’YYYY’}{/} |
|
Entity Fiscal Year End date - Month and Year |
{entities | grab:1:’fiscalYearEnd’ | time:’MM YYYY’} |
|
Directors |
||
Plural Directors |
{#(RES_affiliations) || (affiliations | status:’!inactive’) | filter:’role’:’Director’ | uniqBy:’participant_profileID’ | except:(tasks | grab:1:‘outgoingAffiliations’):’affiliationID’ | count | gt:1}All of the Directors{/} |
This code is a powerful tool for managing affiliations and tasks in a specific context:
|
Singular Director |
{#(RES_affiliations) || (affiliations | status:’!inactive’) | filter:’role’:’Director’ | uniqBy:’participant_profileID’ | except:(tasks | grab:1:‘outgoingAffiliations’):’affiliationID’ | count | lt:2}Sole Director{/} |
This code outputs the text ‘Sole Director’ when there are fewer than two Director records being accessed. |
List of all Active Directors' Full Name(s) |
{#(RES_affiliations) || (affiliations | status:’!inactive’) | filter:’role’:’Director’ | uniqBy:'participant_profileID' | except:(tasks | grab:1:‘outgoingAffiliations’):’affiliationID’}{participant_fullName} {/} |
Retrieve the full names of currently active directors as a list format, excluding those selected as outgoing in the task. |
Officers |
||
Active Officers List(Not Grouped, Ordered by Rank) |
{#RES_affiliations || (affiliations | status:’!inactive’) | filter:’role’:’Officer’ | uniqBy:’participant_profileID’ | except:(tasks | grab:1:‘outgoingAffiliations’):’affiliationID’ | orderBy_B:'rank'} {participant_fullName} {#(title!=type)&&(type!=’Other’)}{type} – {title}{/}{#type==’Other’}{title}{/}{#title==type}{type}{/} {/} |
The logical if statement:
|
Handling Custom Officer Types and Custom Titles |
{#…} {#(title!=type)&&(type!=’Other’)}{type} – {title}{/}{#type==’Other’}{title}{/}{#title==type}{type}{/} {/} |
Output Context When the Logical 'If' Statement Returns Officer Records:
|
Active Officers (grouped) |
{#(RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:’Officer’ | except:(tasks | grab:1:’outgoingAffiliations’):'affiliationID' | orderBy_B:’rank' | groupBy:’participant_profileID’}{group | grab:1:’participant_fullName’} {group | toSentence:’title’}{/} |
In this code, an additional operation we employ is the 'groupBy' function. This function is to segment all the officers retrieved in the expression. The benefit of using 'groupBy' here is to avoid duplicating each office occurrence for an individual officer. This means a person can hold multiple office titles, and with 'groupBy', we can print the values from each group without redundancy. If you'd like to delve deeper into the 'groupBy' operator, you can refer to the post on the difference between UniqBy and GroupBy." |
Singular Officer |
{#tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Officer’ | count | equal:1}{tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Officer’ | grab:1:’participant_fullName’} {tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Officer’ | toSentence:’title’}{/} |
This code prints an officer’s full name and title from the incoming affiliations that are selected in the task. Please refer to “Handling Custom Officer Types and Custom Titles” code snippet to cover more case scenarios. Using Assignment method is always recommended to improve the code readability and re-usability. If you'd like to delve deeper into the Assignment function, you can refer to this link." |
Registered Office |
||
Registered Office Address |
{(RES_affiliations) || (affiliations | status:'confirmed') | filter:’title’:’Registered Office’ | grab:1:’addresses’ | filter:’addressStatus’:’!inactive’:'!outgoing' | grab:1:’address’} |
|
Auditor |
||
Auditor's name |
{#(RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:'type':'Auditor' | count | gt:0}{(RES_affiliations) || (affiliations | status:'!inactive' ) | filter:’role’:'Other Professional' | filter:'type':'Auditor' | grab:1:’participant_fullName’}{/}{#(RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:'type':'Auditor' count | lt:1}_____________________{/} |
|
Active Auditor Count |
{#(RES_affiliations || affiliations | status:'!inactive' ) | filter:’role’:'Other Professional' | filter:'type':'Auditor' | count | gt:0} {/} |
|
{#(RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:'type':'Auditor' count | lt:1} {/} |
|
|
Accountants |
||
Accountants Name |
{#(RES_affiliations || affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:'type':'Accountant' | count | gt:0}{(RES_affiliations || affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:'type':'Accountant' | grab:1:’participant_fullName’}{/} |
|
Shareholders |
||
Plural Shareholders |
{#(RES_shareholdings || shareholdings) | filter:'totalShares':'!0' | uniqBy:'participantID' | count | gt:1}All Shareholders{/} |
|
Singular Shareholder |
{#(RES_shareholdings || shareholdings) | filter:'totalShares':'!0' | uniqBy:'participantID' | count | lt:2}Sole Shareholder{/} |
|
Non-Voting Shareholder Pluralization |
{#(RES_shareholdings|| shareholdings) | filter:'shares':'!0' | filter:’votes’:’0’ | uniqBy:'participantID' | count | gt:1}All of the Non-Voting Shareholders{/} |
|
Voting Shareholder Pluralization |
{#(RES_shareholdings|| shareholdings) | filter:'shares':'!0' | filter:’votes’:’!0’ | uniqBy:'participantID' | count | gt:1}All of the Voting Shareholders{/} |
|
Tasks |
||
Resolution Date |
{tasks | grab:1:’resolutionDate’ | time:’MMMM D, YYYY’}{#(tasks | grab:1:’resolutionDate’)==’’}_____________________{/} ________Version 2_______ {(tasks | grab:1:’resolutionDate’ | time:’MMMM D, YYYY’) || ('_____________________')} |
|
Task Annual General Meeting Date |
_______Version 1________ {#(entities | grab:1:’nextAGM’)!=’’}{entities | grab:1:’nextAGM’ | time:'MMMM D, YYYY'}{/}{#(entities | grab:1:’nextAGM’)==’’}{#tasks}{(agmDate || effectiveDate) | time:’MMMM D, YYYY’}{/}{/}{#((tasks | grab:1:’agmDate’)==’’)&&((tasks | grab:1:’effectiveDate’)==’’)}__________________{/} ________Version 2_______ {((entities | grab:1:’nextAGM’) || (tasks | grab:1:'agmDate') || (tasks | grab:1:'effectiveDate') | time:’MMMM D, YYYY’) || (‘____________________’)} |
Version 1:
Version 2:
|
Resigned Director Count |
{#tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Director’ | filter:’endReason’:’Resigned’ | count | gt:0} {/} |
|
Resigned Directors Full Name(s) |
{tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Director’ | filter:’endReason’:’Resigned’ | toSentence:’participant_fullName’} |
This will list all the names of the resigning directors in the document (using toSentence will separate the names with commas and the word "and" before the last iteration). |
Removed Director Count |
{#tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Director’ | filter:’endReason’:’Removed’ | count | gt:0} {/} |
|
Removed Directors Full Name(s) |
{tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Director’ | filter:’endReason’:’Removed’ | toSentence:’participant_fullName’} |
This will list all the names of the removed directors in the document (using toSentence will separate the names with commas and the word "and" before the last iteration) |
Newly Elected Directors Full Name(s) |
{tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Director’ | toSentence:’participant_fullName’} |
This will list all the names of the incoming directors in the document (using toSentence will separate the names with commas and the word “and” before the last iteration). |
Newly Elected Directors Start Date |
{tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Director’ | grab:1:’startDate’ | time:’MMMM D, YYYY’} |
This will grab the start date of the incoming directors. |
Resigned Officer Count |
{#tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’ | count | gt:0} {/} |
This is logic that will trigger if there is an officer that has resigned and that officer has been added to the outgoing affiliations section of the task. |
Resignation of a Single Officer Name and Title(s) |
{#tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’ | count | equal:1}{tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’ | grab:1:’participant_fullName’} has resigned as {tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’ | toSentence:’title’}{/} |
This is used if you have different wording for a single officer versus multiple officers resigning in your document. |
Resignation of Multiple Officers Names, Titles and End Dates |
{#tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’ | groupBy:’participant_profileID’}{group | grab:1:’participant_fullName’} as {group | toSentence:’title’}{/} as of the Corporation, effective {tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’ | grab:1:’endDate’ | time:’MMMM D, YYYY’}{/} |
|
Single Incoming Officer Name and Title(s) |
{tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Officer’ | grab:1:’participant_fullName’} is appointed {tasks | grab:1:’incomingAffiliations’ | filter:’role’:’Officer’ | toSentence:’title’} |
This coding will list all incoming officers. It will list their full name and then all the titles they are appointed to. |
Related to