Function GetContractTenantsData

Gets a object of data about Tenants for a Tenancy

This function is a quick way to call the Function Class_ContractTenants

GetContractTenantsData([PROPCODE],[CONCODE],[GETMETHOD],[GETTYPE],[SEPARATOR],[EXPRESSION])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringrequiredn/aPROPCODEThe property code, usually PROPCODE.
2stringrequiredn/aCONCODEThe contract code, usually CONCODE.
3integerrequired0GETMETHODMethod to use to get data
These settings are the same as Function Class_ContractTenants
GETMETHODFilterDescription
0ACTIVE AND TENTYPE<=2All Active Tenants, except Benefit Agency and Permitted Occupiers
1ACTIVE AND TENTYPE=1Active Lead Tenant
2ACTIVE AND TENTYPE=2All Active Tenants except Lead Tenant, Benefit Agency and Permitted Occupiers
3ACTIVE AND TENTYPE=3All Active Benefit Agency
4ACTIVE AND TENTYPE=4All Active Permitted Occupiers
-2ACTIVE AND TENTYPE<>2All Active Lead Tenant, Benefit Agency and Permitted Occupiers
-3ACTIVE AND TENTYPE<>3All Active Tenants and Permitted Occupiers
-4ACTIVE AND TENTYPE<>4All Active Tenants and Benefit Agency
10TENTYPE=1Lead Tenant (Active or Inactive)
20TENTYPE=2All Tenants except Lead Tenant, Benefit Agency and Permitted Occupiers (Active or Inactive)
30TENTYPE=3All Benefit Agency (Active or Inactive)
40TENTYPE=4All Permitted Occupiers (Active or Inactive)
4integerrequired0GETTYPE1 = Get unique email addresses (Calls GetEmailAddressList)
2 = Get unique data based on the expression in the next parameter (Calls GetExpressionList)
5stringrequiredn/aSEPARATORThe separator character when more than one item returned.
6stringrequiredn/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.

GetContractTenantsData(PROPCODE,CONCODE,0,1,"|","")

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

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

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

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