Function GetContractTenantsData

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

# Type Passing Default Name Description/Comments
1 string required n/a PROPCODE The property code, usually PROPCODE.
2 string required n/a CONCODE The contract code, usually CONCODE.
3 integer required 0 GETMETHOD Method to use to get data
These settings are the same as Function Class_ContractTenants
GETMETHOD Filter Description
0 ACTIVE AND TENTYPE<=2< /td> All Active Tenants, except Benefit Agency and Permitted Occupiers
1 ACTIVE AND TENTYPE=1 Active Lead Tenant
2 ACTIVE AND TENTYPE=2 All Active Tenants except Lead Tenant, Benefit Agency and Permitted Occupiers
3 ACTIVE AND TENTYPE=3 All Active Benefit Agency
4 ACTIVE AND TENTYPE=4 All Active Permitted Occupiers
-2 ACTIVE AND TENTYPE<>2 All Active Lead Tenant, Benefit Agency and Permitted Occupiers
-3 ACTIVE AND TENTYPE<>3 All Active Tenants and Permitted Occupiers
-4 ACTIVE AND TENTYPE<>4 All Active Tenants and Benefit Agency
10 TENTYPE=1 Lead Tenant (Active or Inactive)
20 TENTYPE=2 All Tenants except Lead Tenant, Benefit Agency and Permitted Occupiers (Active or Inactive)
30 TENTYPE=3 All Benefit Agency (Active or Inactive)
40 TENTYPE=4 All Permitted Occupiers (Active or Inactive)
4 integer required 0 GETTYPE 1 = Get unique email addresses (Calls GetEmailAddressList)
2 = Get unique data based on the expression in the next parameter (Calls GetExpressionList)
21 = Get unique email addresses (Calls GetEmailAddressList) including Guarantors
22 = Get unique data based on the expression in the next parameter (Calls GetExpressionList) including Guarantors
5 string required n/a SEPARATOR The separator character when more than one item returned.
6 string required n/a EXPRESSION The 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)")