Function GetPropertyTenantsData

Gets a object of data about Tenants for a Tenancy

This function is a quick way to call the Function Class_PropertyTenants

GetPropertyTenantsData([PROPCODE],[GETMETHOD],[GETTYPE],[SEPARATOR],[EXPRESSION])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringrequiredn/aPROPCODEThe property code, usually PROPCODE.
2integerrequired0GETMETHODMethod to use to get data
These settings are the same as Function Class_PropertyTenants
GETMETHODDescription
0Use system level setting (default 4)
1Additional Tenants Note List
2All Active Tenants Terms Records
3All Active People associated as Tenants to the Property
4Get current Tenant List based on today's date or fall back to other methods
5From Tenants Terms Records with Offer Code stored in m.pcTenantsOfferCode
3integerrequired0GETTYPE1 = Get unique email addresses (Calls GetEmailAddressList)
2 = Get unique data based on the expression in the next parameter (Calls GetExpressionList)
4stringrequiredn/aSEPARATORThe separator character when more than one item returned.
5stringrequiredn/aEXPRESSIONThe expression to use for each item (Tenant) record, when GETTYPE = 2
Expression field names must always be prefixed with CLIENT irrelevant of where this is used.
e.g. CLIENT.CLCODEDESC

Returns

The resulting string



Examples

Get email address for each tenant pipe ( | ) delimited.

GetPropertyTenantsData(PROPCODE,0,1,"|","")

Get first name and surname for each tenant pipe ( | ) delimited.

GetPropertyTenantsData(PROPCODE,0,2,", ",",alltrim(CLIENT.FNAME)+' '+alltrim(CLIENT.SNAME)")

Get mobile number for each tenant pipe with a HTML break ( <br> ) in between.

GetPropertyTenantsData(PROPCODE,0,2,"<br>",",alltrim(CLIENT.MOBILE)")