Function SetupLandlords

Sets up multiple landlords for use in the looping code

SetupLandlords([LOOP_ID],[ID],[SOURCE],[LANDLORD_TYPE],[TENANCY_PERIOD],[DATE])

Parameters

#TypePassingDefaultNameDescription/Comments
1integerrequiredn/aLOOP_IDThe identifier of the looper that will be used during looping
2stringrequiredn/aIDThe identifier of the record based on SOURCE
3integeroptional1SOURCEThe source record type where 1=Property, 2=Tenancy
4integeroptional0LANDLORD_TYPEThe tenant type where:
0All landlords
1Lead landlord
2Other landlords
5integeroptional0TENANCY_PERIODThe tenancy period where:
0Ignore
1Landlords that are in the tenancy currently
2Landlords that are in the next tenancy
3Landlords that are in the previous tenancy

Note that this will only be applied if the [DATE] option is unset and running against a property

6datetimeoptionalnullDATEFinds landlords where the date lies within the tenancy if running against a property

Returns

n/a


Examples

Example to setup landlords for looping in a single tenancy

{{SetupLandlords(1,ALIAS.CONCODE,2)}}

Example to setup landlords for looping in the current tenancy for the property

{{SetupLandlords(1,ALIAS.PROPCODE,1,0,1)}}

Example to setup landlords for looping in the next tenancy for the property

{{SetupLandlords(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.