Function Class_ContractTenants

Gets a object of data about Tenants for a Tenancy

Class_ContractTenants([ALIASFROM])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringoptionalBlankALIASFROMThe alias to get the data from (CONTRACT table)

Returns

A Tenancy Tenant Object


Method to Get Data

Class_ContractTenants.getdata([ALIASFROM],[GETMETHOD])

Parameters

#TypePassingDefaultNameDescription/Comments
1stringrequiredalias()ALIASFROMThe alias to get the data from (CONTRACT table)
2integeroptional0GETMETHODMethod to use to get data
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)

Examples

{{Local m.poTenants}}
{{m.poTenants = Class_ContractTenants()}}
{{m.poTenants.getdata(alias(),0)}}

Will get the data and store it in a variable for later use as m.poTenants


{{o.set("poTenants",Class_ContractTenants())}}
{{m.o.poTenants.getdata(alias(),0)}}

Will get the data and store it in the o variable as poTenants for later use as m.o.poTenants


Example use


{{m.o.poTenants = Class_ContractTenants()}}
{{m.o.poTenants.getdata("CONTRACT",0)}}


{{IF m.o.poTenants.numberoftenants>0}}


{{ENDIF}}

{{IF m.o.poTenants.numberoftenants>1}}


{{ENDIF}}

{{IF m.o.poTenants.numberoftenants>2}}


{{ENDIF}}

{{IF m.o.poTenants.numberoftenants>3}}


{{ENDIF}}
The Tenant:[[m.o.poTenants.tenants[1].clcodedesc]]
of[[m.o.poTenants.tenants[1].address]]
The Tenant:[[m.o.poTenants.tenants[2].clcodedesc]]
of[[m.o.poTenants.tenants[2].address]]
The Tenant:[[m.o.poTenants.tenants[3].clcodedesc]]
of[[m.o.poTenants.tenants[3].address]]
The Tenant:[[m.o.poTenants.tenants[4].clcodedesc]]
of[[m.o.poTenants.tenants[4].address]]


Method Calls Available


NameReturnsPassingDefaultDescription/Comments
GetEmailAddressListstringSeparator Character|Returns a list of unique email addresses from Tenants
GetExpressionListstringSeparator Character
Expression String - fields referenced must be prefixed CLIENT.
NoneReturns the unique evaluated expression for each Tenant.
Each item except the last with be seperated by the seperator
GetExpressionListAllstringSeparator Character
Expression String - fields referenced must be prefixed CLIENT.
NoneReturns the evaluated expression for each Tenant.
Each item except the last with be seperated by the seperator

Examples

m.o.poTenants.GetEmailAddressList(";")
m.o.poTenants.GetExpressionList(", ","alltrim(CLIENT.FNAME)+' '+alltrim(CLIENT.SNAME)")