Function GetAttachmentFiles
Adds attachment files for an email
GetAttachmentFiles([TYPE],[CODE],[SUB_FOLDER],[SEARCH_WILDCARD],[INCLUDE_FILTER])NOTE: This function will only pick up files from one folder, it will not recurse sub folders.
Parameters
| # | Type | Passing | Default | Name | Description/Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | integer | required | n/a | TYPE | Folder Type:
| ||||||
| 2 | string | required | n/a | CODE | The key field to use to get the item folder which is usually a property or contact code.
The following show some examples:
NOTE:If TYPE=2 (Master Property Folder) and PROPCODE is passed then it will look for the master property i.e. PROPCODEMS of the PROPCODE | ||||||
| 3 | string | optional | none | SUB_FOLDER | An optional sub folder name. | ||||||
| 4 | string | optional | *.* | SEARCH_WILDCARD | A file wildcard to apply e.g. *.* or *.pdf or *.jpg or EmailAttachments*.jpg | ||||||
| 5 | boolean | optional | true | INCLUDE_FILTER | Whether to include the attachment if using an additional filter (please see below). |
Examples
| This will attach all files found in the property folder for the property code supplied. |
| This will attach all files found in the property folder for the property code supplied where the file name starts with "Attachments" and the extension is "pdf". |
| This will attach all files found in the property folder's sub-folder called "Docs" for the property code supplied where the file name contains "prop" and the extension is "pdf". |
| This will attach all files found in the contact folder for the contact code supplied where the file name contains "details" and can be any extension where the contact is a tenant type contact. |
| This will attach a file from the contact folder for the contact code supplied where the file name matches "Recharge_{{ALIAS.CLCODE}}.pdf". For example if the client code is "CLCODE_00001" then it will attach a file called "Recharge_CLCODE_00001.pdf". |
