Formulae - Extra Formulae for AP
DirRange command
Accounts Production supports the use of the DirRange command to list trustees’ details on the Information Page. A typical command is as follows:
AP("DirRange,#dr13 #dr11 #dr12 #dr105,IsTrusteeNowAndThen")
The field codes are as follows:
Code |
Value |
#dr3 |
Start date |
#dr4 |
End date |
#dr11 |
Initials (if Name override is blank) |
#dr12 |
Last name (if Name override is blank) |
#dr13 |
Name override |
#dr42 |
Middle name (if Name override is blank) |
#dr43 |
Suffix (if Name override is blank) |
#dr105 |
Shows date retired or died, e.g. “(Retired 4 April 2015)” or “(Deceased 4 April 2015)” |
The second parameter, IsTrusteeNowAndThen above, has two parts:
First Part |
Officer Required |
IsBeneficiary |
Reports on beneficiaries |
IsSettlor |
Reports on settlors |
IsTrustee |
Reports on trustees |
Second Part |
When Acted |
Now |
Acted at the date of signing the Trustees’ Report (not applicable to trust clients) |
Then |
Acted at the date of signing the Balance Sheet (not applicable to trust clients) |
NowAndThen |
Acted at any point in the year |
So the second parameter can currently only be IsBeneficiaryNowAndThen, IsSettlorNowAndThen or IsTrusteeNowAndThen.
Using the DirRange command has three advantages over using the #be, #st and #te commands for picking up individual beneficiary, settlor and trustee details:
- DirRange will use the name override if specified on the Officers screen.
- DirRange allows the use of the NowAndThen parameter to pick up officers who acted at any point in the year; whereas #be, #st and #te show beneficiaries etc. as at the year end.
- DirRange allows use of the #dr105 parameter to indicate whether an officer retired or died during the year.
- DirRange lists the officers according to the Order column on the Officers screen.
#bsig command
The user can select which trustees are signing the accounts using the Officers screen. The command to insert the trustee’s name is #bsig1 for the first signatory, #bsig2 for the second and so on. For instance =AP(“#bsig2”)
- The user cannot control exactly which fields from the trustee are listed using field codes. But the #bsig command will use a name override if specified on the Officers screen.
- Signatories are listed according to the Order column on the Officers screen.
FormatPrints command
Formats can be manually excluded or added to the set of accounts to be printed using the options right-click > Include in Print or Exclude From Print. The FormatPrints command enables the system to check whether a particular page will be printed or not and to suppress or include the row accordingly.
The syntax for this command is: FormatPrints,FormatCode
For instance,
=AP("If FormatPrints,PageSOFP=0 Then RS Else `Print` Endif")
Returns -1 if the page will print, or 0 if not.
NotesPrint command
In a similar way notes can be included or excluded from the set of accounts to be printed. The NotesPrint command enables the system to check whether any notes will be printed or not and to suppress or include the row referring to the note numbers accordingly.
The syntax for this command is simply: NotesPrint
For instance,
=AP("If NotesPrint=0 Then RS Else `Print` Endif")