Standard Coding Patterns
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!
- 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.
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’)!='Nova Scotia'}{#(entities | grab:1:’jurisdictionRegion’)==’Canada (Federal)’}Canada {/}{#((entities | grab:1:’jurisdictionRegion’)!='Manitoba') || ((entities | grab:1:’jurisdictionRegion’)!='Newfoundland and Labrador')}Business {/}Corporations Act{#(entities | grab:1:’jurisdictionRegion’)!=’Canada (Federal)’} ({entities | grab:1:’jurisdictionRegion’}){/}{/} | Using conditional logic with comparison operators ‘==’, ‘!=’ to output a 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_____ apples{entities | grab:1:'nextAGM' | time:'_MMMM D, YYYY'} bananas |
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{/} |
On the contrary, this code outputs the text ‘Sole Director’ when there are fewer than 2 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' | groupBy:’participant_profileID’ | orderBy_B:’rank'}{group | grab:1:’participant_fullName’} {group | toSentence:’title’}{/} |
In this code, an additional operation we employed 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 is pretty straightforward that printing an officer’s full name and title from the incoming affiliations that are selected in the task.
|
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. |
Standard Assignments Library
Streamline your Document Automation in Athennian with the best practice of coding documents using assignments. Instead of complex syntax, utilize single custom variables, booleans, and collections for readability. Updates become a breeze with changes applied universally.
Explore our standardized Annual Resolutions templates coded with teal-colored assignments. Access the real code in the Summary section of each document. Watch the brief video below to learn how to navigate assignments stored in the document properties' Summary section.
Note: You have the option to store assignment code in a separate Word document, similar to Athennian sub-templates. Please use the raw tag '@' syntax to ensure values and hard returns in the assignment code are not populated in the document through sub-template insertion. Please stay tuned for our next articles on how to use raw tags in Athannian document coding.
Download the coded templates and assignment code snippets below by clicking on the link for an in-depth exploration. Note that each resolution document includes signature sub-template insert code, requiring the inclusion of relevant sub-templates in the documents.
- Directors Annual Resolutions - coded with Assignments
- Shareholders Annual Resolutions - coded with Assignments
- Annual Resolutions - Financial and Auditor - coded with Assignments
- Assignments Code Snippets - Annual Compliance
Assignment Name |
Assignment Coding |
Notes |
---|---|---|
Entity (General) |
||
entityNameASG |
{entityNameASG=(entities | grab:1:'entityName')} |
|
entityJurisRegionASG |
{entityJurisRegionASG=(entities | grab:1:'jurisdictionRegion’)} |
|
corpActCanASG 🇨🇦 |
{#(entities | grab:1:’jurisdictionRegion’)=='Canada (Federal)'} {corpActCanASG='Canada Business Corporations Act'} {corpActProvCanASG=’’} {/} {#(entities | grab:1:’jurisdictionRegion’)=='Nova Scotia'} {corpActCanASG='Companies Act’} {corpActProvCanASG=’ (‘+(entities | grab:1:’jurisdictionRegion’)+’)'} {/} {#((entities | grab:1:’jurisdictionRegion’)=='Manitoba') || ((entities | grab:1:’jurisdictionRegion’)=='Newfoundland and Labrador')} {corpActCanASG='Corporations Act'} {corpActProvCanASG=’ (‘+(entities | grab:1:’jurisdictionRegion’)+’)'} {/} {#((entities | grab:1:’jurisdictionRegion’)!='Manitoba')&&((entities | grab:1:’jurisdictionRegion’)!='Newfoundland and Labrador')&&((entities | grab:1:’jurisdictionRegion’)!='Nova Scotia')&&((entities | grab:1:’jurisdictionRegion’)!='Canada (Federal)’)} {corpActCanASG='Business Corporations Act'} {corpActProvCanASG=’ (‘+(entities | grab:1:’jurisdictionRegion’)+’)'} {/} |
In this assignment coding, it's imperative to use both corpActCanASG and corpActProvCanASG in tandem within the document coding, as demonstrated below. It's worth noting that {corpActCanASG} is formatted in italics, while {corpActProvCanASG} is directly appended without a space. This distinction arises from two key considerations:
{corpActCanASG}{corpActProvCanASG} Example 1: Canada Business Corporations Act Example 2: Companies Act (Nova Scotia)
|
corpActProvCanASG 🇨🇦 |
||
companyCorpASG 🇨🇦 |
{#(entities | grab:1:’jurisdictionRegion’)=='Nova Scotia'} {companyCorpASG='Company'} {/}{#(entities | grab:1:’jurisdictionRegion’)!='Nova Scotia'} {companyCorpASG='Corporation'} {/} |
|
waivedAuditorASG |
{waivedAuditorASG=(entities | grab:1:’waivedAuditor’)} |
A simple boolean assignment |
waivedAGMASG |
{waivedAGMASG=(entities | grab:1:’waivedAGM’)} |
A simple boolean assignment |
shareholderAgrmtUnamsASG |
{shareholderAgrmtUnamsASG=(entities | grab:1:’shareholderAgreementUnanimous’)} |
|
waivedFinancialsASG |
{waivedFinancialsASG=(entities | grab:1:’waivedFinancials’)} |
A simple boolean assignment |
fiscalYearEndASG |
{fiscalYearEndASG=(entities | grab:1:’fiscalYearEnd’)} |
|
nextAGMMASG |
{nextAGMASG=(entities | grab:1:’nextAGM’)} |
|
Directors |
||
activeDirectorsASG |
{activeDirectorsASG=((RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:’Officer’ | uniqBy:’participant_profileID’ | except:(tasks | grab:1:’outgoingAffiliations’):'affiliationID')} |
This is a collection assignment where the name is in plural form, as opposed to single assignments, which have names in singular form. |
Officers |
||
activeOfficersASG |
{activeOfficersASG=((RES_affiliations) || (affiliations | status:’!inactive’) | filter:'role':'Officer' | except:(tasks | grab:1:’outgoingAffiliations’):'affiliationID' | uniqBy:'participant_profileID')} |
This is a collection assignment where the name is in plural form, as opposed to single assignments, which have names in singular form. |
activeOfficersGroupASG |
{activeOfficersGroupASG=((RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:’Officer’ | except:(tasks | grab:1:’outgoingAffiliations’):'affiliationID' | groupBy:’participant_profileID’ | orderBy_B:’rank’)} |
|
Shareholders |
||
votingShareholderPluralASG |
{#(RES_shareholdings || shareholdings) | filter:’totalShares’:'!0' | filter:’totalVotes’:’!0’ | uniqBy:’participantID’ | count | gt:1} {votingShareholderPluralASG='s'} {/} |
If number of voting shareholders is greater than one, the ASG code add 'S' as pluralization |
allShareholdersASG |
{allShareholdersASG=((RES_shareholdings || shareholdings) | filter:'totalShares':'!0' | uniqBy:’participantID’)} |
Collection assignment |
votingShareholdersASG |
{votingShareholdersASG=((RES_shareholdings || shareholdings) | filter:'shares':'!0' | filter:’votes’:’!0’ | uniqBy:'participantID')} |
Collection assignment |
Auditor |
||
activeAuditorsASG |
{activeAuditorsASG=((RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:’type’:’Auditor’)} |
Collection assignment |
Accountant |
||
activeAccountantsASG |
{activeAccountantsASG=((RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:’type’:’Accountant’)} |
Collection assignment |
Registered Office |
||
regOfficeAddressASG |
{regOfficeAddressASG=(RES_affiliations) || (affiliations | status:'confirmed') | filter:’title’:’Registered Office’ | grab:1:’addresses’ | filter:’addressStatus’:’!inactive’:'!outgoing' | grab:1:’address’} |
|
Task |
||
resignedDirectorsASG |
{resignedDirectorsASG=(tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Director’ | filter:’endReason’:’Resigned’)} |
|
resignedOfficersASG |
{resignedOfficersASG=(tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’} |
|
resignedOfficersGroupASG |
{resignedOfficersGroupASG=(resignedOfficersASG | groupBy:'participant_profileID')} |
|
removedOfficersASG |
{removedOfficersASG=(tasks | grab:1:’outgoingAffiliations’ | filter:’role’:���Officer’ | filter:’endReason’:’Removed’)} |
|
removedOfficersGroupASG |
{removedOfficersGroupASG=(removedOfficersASG | groupBy:'participant_profileID')} |
|
- Shareholders Annual Resolutions.docx40 KB
- Annual Resolutions - Financials and Auditor - Coded with Assignments.docx30 KB
- Directors Annual Resolutions - Coded with Assignments.docx30 KB
- Shareholders Annual Resolutions - Coded with Assignments.docx40 KB
- Assignments Code Snippets - Annual Compliance.docx20 KB
- Annual Resolutions - Financials and Auditor.docx30 KB
- Directors Annual Resolutions.docx40 KB