Function SetupTenants
Sets up multiple tenants for use in the looping code
SetupTenants([LOOP_ID],[ID],[SOURCE],[TENANT_TYPE],[TENANCY_PERIOD],[DATE],[USE_HMO])
Parameters
# | Type | Passing | Default | Name | Description/Comments | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | integer | required | n/a | LOOP_ID | The identifier of the looper that will be used during looping | ||||||||||||||||
2 | string | required | n/a | ID | The identifier of the record based on SOURCE | ||||||||||||||||
3 | integer | optional | 1 | SOURCE | The source record type where 1=Property, 2=Tenancy | ||||||||||||||||
4 | integer | optional | 0 | TENANT_TYPE | The tenant type where:
| ||||||||||||||||
5 | integer | optional | 0 | TENANCY_PERIOD | The tenancy period where:
Note that this will only be applied if the [DATE] option is unset and running against a property | ||||||||||||||||
6 | datetime | optional | null | DATE | Finds tenants where the date lies within the tenancy if running against a property | ||||||||||||||||
7 | boolean | optional | false | USE_HMO | Whether to use the hmo setting to perform the match where:
|
Returns
n/a
Examples
Example to setup tenants for looping in a single tenancy
{{SetupTenants(1,ALIAS.CONCODE,2)}}
Example to setup tenants for looping in the current tenancy for the property
{{SetupTenants(1,ALIAS.PROPCODE,1,0,1)}}
Example to setup tenants for looping in the next tenancy for the property
{{SetupTenants(1,ALIAS.PROPCODE,1,0,2)}}
Notes
Ensure that this code is only added to the header and not the body as it sets up the looping before the body is processed.