Function GetAttachmentFiles

Function GetAttachmentFiles

Make up a property URL

GetAttachmentFiles([TYPE],[KEYFIELD],[SUBFOLDER],[FILEWILDCARD])

NOTES: 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

0 = Property Folder
1 = People Folder
2 = Master Property Folder
2 string required n/a KEYFIELD The key field to use to get the item folder which is usually a poreprty or person code
e.g. PROPCODE = property code, CLCODE = Client Code, CLCODE2 = Client code etc
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 SUBFOLDER An optional sub folder of the main folder made.
This allows files to be picked from a sub folder of the property or person folder.
4 string optional *.* FILEWILDCARD A file wildcard to apply e.g. *.* or *.pdf or *.jpg or EmailAttachments*.jpg

Returns

A list of full path and file names that are found delimited with a semi colon (as required by the output engine).


Examples


This will pick up all files in the Property folder for the property with the property code in PROPCODE
[[GetAttachmentFiles(0,PROPCODE,"","*.*")]]

This will pick up all files with a file name that matches the wild card "Attachments*.pdf" in the Property folder for the property with the property code in PROPCODE
[[GetAttachmentFiles(0,PROPCODE,"","Attachments*.pdf")]]

This will pick up all files in the Property folder in a sub folder called "Certificates" for the property with the property code in PROPCODE
[[GetAttachmentFiles(0,PROPCODE,"Certificates","*.*")]]

Additional notes

This function is available within PCHomes Estate Agent Software, Letting Agent Software and Property Management Software suites.
It is designed to be used in the output engine to help automatically pick up attachment files for emails.
The output that requires this will need to be configured to call this function with the appropriate parameters.