Annual Compliance

Doc Auto Team
Doc Auto Team
  • Updated

 

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!

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}
  • Using ‘grab’ function retrieving entityName from entities collection
  • It is highly unlikely that an entity would have no recorded name in the database, making the use of the 'grab' function optimal in this scenario.

  • The ‘| upper’ code here will make the entityName appear in the document as uppercase. Remove the ‘| upper’ if this is not the desired result.

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}

{/}

  • Use this coding as the logic to decide whether any clauses that need to appear in the document when the waived auditor button is not checked.
  • As this initiates an 'if' statement logic opening {#}, it is essential to include a corresponding closing tag.{/}
  • It is best practice to code booleans as “not = true” (!=true) rather than “equal to false” (==false). Specifying that the boolean is equal to false is very specific and will not catch if the variable is equal to blank or Null.
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:

  • Using an ‘if' statement, to check if the 'Next AGM date' field for a company is not empty. If this condition is met, we then extract and format the 'Next AGM date' value from the entities 'collection’.

  • Additionally, there is a combination of code that can be utilized in conjunction with this snippet. For further details, please reference to the 'Task Annual General Meeting Date' section in this document.

Version 2:

  • Using the 'grab' function we retrieve ‘Next AGM date’ value from entity and then employ the 'time format' function to present it in the 'MMMM D, YYYY' format.

  • :warning: When utilizing the 'grab' function, it may result in an empty space if it returns an empty string. To prevent this, it's advisable to enclose the code within an 'if' statement (as shown in Version 1). Alternatively, you can use it in conjunction with the '||' function to ensure that one of the statements between the 'OR' functions returns a value, thus avoiding empty spaces.

Version 3:

  • If you choose not to use the 'OR' function or enclose the code within an 'if' statement, an alternative workaround to avoid empty spaces is to merge the opening curly bracket with the last character of the preceding text, while still maintaining an empty space in the formatting.

Entity Fiscal Year End date - Year Only

{#(entities | grab:1:’fiscalYearEnd’)!=’’}{entities | grab:1:’fiscalYearEnd’ | time:’YYYY’}{/}

  • Prints entity’s Fiscal Year End date in YYYY format.

  • :warning: This code may result in an empty space if it returns an empty string. However, please refer to the code explanation for potential workaround for “Entity’s Next Annual General Meeting date”.

Entity Fiscal Year End date - Month and Year

{entities | grab:1:’fiscalYearEnd’ | time:’MM YYYY’}

  • Prints entity’s Fiscal Year End date in MM YYYY format.

  • :warning: This code may result in an empty space if it returns an empty string. However, please refer to the code explanation for potential workaround for “Entity’s Next Annual General Meeting date”.

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:

  • It filters out only the active records with the role of Director from either the RES_affiliations or affiliations collections.

  • Next uses the ‘uniqBy’ function to obtain distinct records based on the 'participant_profileID'.

  • It then applies the ‘except’ operator to remove any selected outgoing records (Directors) from the tasks collection, effectively excluding directors from those records

  • Finally, it employs the 'count' function to ascertain whether at least one director is being pulled in this expression.

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:

  • It filters out only the active records with the role of Officer from either the RES_affiliations or affiliations collections.

  • Next uses the ‘uniqBy’ function to obtain distinct records based on the 'participant_profileID'.

  • It then applies the ‘except’ operator to remove any selected outgoing records (Directors) from the tasks collection, effectively excluding directors from those records

  • Finally, it utilizes the 'orderBy_B' function to ensure that all officers being output are sorted by their rank in their respective office titles.

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:

  • If an officer record uses one of the predefined 'Office Roles' from the standard pick list, but the 'Custom Title' field for the officer contains custom data, it results in the variable {title} being replaced by the custom data. This means that the {type} and {title} variables are no longer identical.

  • Additionally, there is an option to select "Other" in the Officer Role field when the standard pick list does not include the desired office title. In such cases, it is recommended to choose "Other" from the list and enter custom data in the "Custom Title" field. Here, the variable {type} stores "Other", and we simply need to print the value from the {title} variable.

  • The final statement is straightforward: only retrieve the value of the {type} variable when both variables are identical

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.

:warning: 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’}

  • The code's purpose is to print the 'active' address information for a confirmed Registered Officer record. Assuming there is only one Registered Office address in an entity, if differs the code can be modified to adding more filters or functions.

  • This code can also be wrapped by logical if statement(s)

  • Address information is being pulled from the {address} single variable that contains static string data. Hence, there are more address components that construct this variable, you can be creative by accessing to the {components} sub-collection within the addresses collection.

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}_____________________{/}

  • If there is an auditor, insert the first active auditor’s name. Otherwise, leave a blank line.

  • Alternatively, you can employ it in combination with the 'OR' functions to capture the code represented by ('______') as the default when the first statement doesn't meet the criteria.

Active Auditor Count

{#(RES_affiliations || affiliations | status:'!inactive' ) | filter:’role’:'Other Professional' | filter:'type':'Auditor' | count | gt:0}

{/}

  • This statement is used to validate whether there is at least one auditor.

  • As this initiates an 'if' statement logic opening {#}, it is essential to include a corresponding closing tag.{/}

{#(RES_affiliations) || (affiliations | status:'!inactive') | filter:’role’:'Other Professional' | filter:'type':'Auditor' count | lt:1}

{/}

  • This statement is used to validate whether there is NO auditors at all.

  • As this initiates an 'if' statement logic opening {#}, it is essential to include a corresponding closing tag.{/}

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’}{/}

  • This code pulls an Accountant name when there is at least one Accountant record in an entity.

  • Can be simplified lot by using Assignment or even an alternative workaround as strip off enclosing if statement.

  • Please refer to Tasks section - ‘Entity’s Next Annual General Meeting date’ Version 3 code explanation as a potential workaround

Shareholders

Plural Shareholders

{#(RES_shareholdings || shareholdings) | filter:'totalShares':'!0' | uniqBy:'participantID' | count | gt:1}All Shareholders{/}

  • This code accesses two collections: RES_shareholdings and shareholdings.

  • It then, filters out records where the ‘totalShares’ is not equal to zero, this is making sure that the shareholder is active and hold share(s) in the entity

  • Also ensures that each shareholder is unique by its id number ‘participantID’

  • Then again it counts the number of unique records available

  • Finally if the count is greater than one, it outputs text "All Shareholders"

Singular Shareholder

{#(RES_shareholdings || shareholdings) | filter:'totalShares':'!0' | uniqBy:'participantID' | count | lt:2}Sole Shareholder{/}

  • This code accesses two collections: RES_shareholdings and shareholdings.

  • It then, filters out records where the ‘totalShares’ is not equal to zero, this is making sure that the shareholder is active and hold share(s) in the entity

  • Also ensures that each shareholder is unique by its id number ‘participantID’

  • Then again it counts the number of unique records available

  • Finally if the count is less than 2 (basically 1 or none), it outputs text "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{/}

  • This code accesses two collections: RES_shareholdings and shareholdings.

  • It then, filters out records where the ‘shares’ is NOT equal to zero, this is making sure that a shareholder is active and hold share(s) in the class

  • Next it filters out records where the ‘votes’ IS equal to zero, basically retrieving all shareholders that have NO voting rights

  • Next ensures that each shareholder is unique by its id number ‘participantID’

  • Then again it counts the number of unique records available

  • Finally if the count is greater than 1 less, it outputs text “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{/}

  • This code accesses two collections: RES_shareholdings and shareholdings.

  • It then, filters out records where the ‘shares’ is NOT equal to zero, this is making sure that a shareholder is active and hold share(s) in the class

  • Next it filters out records where the ‘votes’ is NOT equal to zero, basically retrieving all shareholders that HAVE voting rights

  • Next ensures that each shareholder is unique by its id number ‘participantID’

  • Then again it counts the number of unique records available

  • Finally if the count is greater than 1 less, it outputs text “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’) || ('_____________________')}

  • If the resolution date was not completed in the task, leave a blank.

  • In the Version 2, we can use || (OR) function and ('__') to pull Resolution Date from task if the date is recorded, or print underline or any text when 1st parameter returns with no value.

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:

  • Dates the Annual General Meeting of the Shareholders will be held on. If the next AGM date is blank AND the AGM date is blank AND the effective date is blank, then you will get a blank line.

Version 2:

  • Alternatively, you can use it in conjunction with the ‘OR’ functions to ensure that one of the statements between the 'OR' functions returns a value, thus avoiding empty spaces.

  • If none of the dates are available, it will present '______' as the default value derived from the final statement in the OR function.

Resigned Director Count

{#tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Director’ | filter:’endReason’:’Resigned’ | count | gt:0}

{/}

  • This is logic that will trigger if there is a director that has resigned and that director has been added to the outgoing affiliations section of the task.

  • Remember to set End Reason field as ‘Resigned’ for a principal who is resigning in order for this code to work.

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}

{/}

  • This is logic that will trigger if there is a director that has been removed and that director has been added to the outgoing affiliations section of the task.

  • Remember to set End Reason field as ‘Removed’ for a principal who is being removed in order for this code to work.

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’}{/}

  • This coding will list all the officers who have resigned. It will list their full name and then all the titles they are resigning from. Also included is the end date.

  • 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 this link."

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.

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:

  1. In the code syntax for defining the assignment {corpActProvCanASG}, an additional space has already been accounted for.

  2. As in the 1st logical statement, when jurisdictionRegion is specified as Canada (Federal), an empty string is transmitted. For that reason this format is to prevent an extra space from being printed in the document

{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’)}

:bulb: Here‘s another recommended practice in Athennian assignment coding. As you can see, we've now created a group for all active officers. This is particularly useful because a single individual may hold multiple offices. While we don't want to repeat each person's name as many times as they are appointed to different offices, we do want to display the office titles in a concise manner. For more details, please refer to the document.
:bulb: At the end of the code, you may have observed that we utilized the 'orderBy_B:’rank' syntax to arrange the officers according to their office ranks. It's important to keep in mind that this ordering code functions effectively when the officers are arranged using the drag-and-drop functionality in the Principals window on the front-end.

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’)}

:bulb: In Annual Compliance task workflow, incoming and outgoing principals are selected automatically when you enter Annual Report date.

resignedOfficersASG

{resignedOfficersASG=(tasks | grab:1:’outgoingAffiliations’ | filter:’role’:’Officer’ | filter:’endReason’:’Resigned’}

:bulb:Please ensure that you set the Inactive Reason on the front-end for principals who have resigned. This is crucial because the assignment code relies on a specific filter for the inactive reason of principals who have been selected as outgoing principals in tasks.

resignedOfficersGroupASG

{resignedOfficersGroupASG=(resignedOfficersASG | groupBy:'participant_profileID')}

 

removedOfficersASG

{removedOfficersASG=(tasks | grab:1:’outgoingAffiliations’ | filter:’role’:���Officer’ | filter:’endReason’:’Removed’)}

 

removedOfficersGroupASG

{removedOfficersGroupASG=(removedOfficersASG | groupBy:'participant_profileID')}