Collect! Credit and Collection Software™

  Page Table of Contents Related 'How To' Tutorials

How To Run Contact Plans In Reports And Control Files

Collect!'s Report Writer enables you to execute events when a report is run. You can set up any sequence of actions you need by creating a contact plan. Then, you can call that plan right inside the Report Body. You can also call plans to run from within a control file.

Use Caution

The @RUNPLAN command is a powerful feature. You are advised to be careful when you use it to run a contact plan, especially if you use it in a report loop! Please test carefully whenever you call a contact plan with this feature.

Top of page.

Runplan Command

The Report Writer command for running a Contact Plan is @RUNPLAN.

SYNTAX: @RUNPLAN({record},{planID}) {if ( @var = n )}

{record} = Either Client, Debtor, Cosigner, or Associated
{planID} = Contact plan code
{if conditional} is optional and behaves normally

Useful Note The @RUNPLAN command is NOT case-sensitive.

EXAMPLE 1:

Run Contact Plan REV on the current Client:

@RUNPLAN(Client,REV)

This would run the REV contact plan on the Client who is current when the report or control file is executed.

EXAMPLE 2:

The @RUNPLAN command also works in loops.

Run Contact Plan REV on all Active Debtors:

@de no total where ( @de.mo = Active ) @RUNPLAN(Debtor,REV) @de

EXAMPLE 3:

The {planID} can also be a variable.

Run @varPlan on current Debtor:

@varPlan* = CLO if ( @de.ow < 1.00 ) @varPlan* = REV if ( @de.ow = 1.01 .. 50.00 ) @RUNPLAN(Debtor,@varPlan)

EXAMPLE 4:

The @RUNPLAN command can also be executed with optional "if" conditions.

Run CLO if the Debtor's Owing is less than $1.00:

@RUNPLAN(Debtor,CLO) if ( @de.ow < 1.00 )

Top of page.

Runplan Troubleshooting

If the @RUNPLAN command cannot be run, then the error is reported to the application log in the REPORT category. Reports printed to screen will display the error on the screen when printed.

@RUNPLAN must be called on one of the valid records above. You can not use another record to call the plan. For example, if you want to run the plan on a debtor, the report must be start on Debtor, or the @RUNPLAN command must be called inside an @de loop. You cannot go into an @mm loop and call @RUNPLAN(Debtor, XXX).

Top of page.

Summary

The @RUNPLAN command enables you to execute events when a report is run. You can set up your contact plans as needed and call the plan from a report or a control file.

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org