homefeaturesexamplesDOCUMENTATIONblogpricingcontact us
technical documentationCATI documentationcookbookrobot

Adding a specialized function to CallWeb


You want to add a calculation capability that does not exist in CallWeb.


Create a Perl subroutine and put it in a file called cwplugins.pl alongside cwroutines.pl.


While CallWeb offers a wealth of functions and allows for any Perl expression as part of CALCULations, it is possible that one particular treatment may not be readily available in the CallWeb toolbox. You may extend CallWeb possibilities by programming a Perl function to do what you want and adding it to a file called "cwplugins.pl" which must be located in the same directory as cwroutines.pl. Note that the cwplugins.pl file must end with a line containing "1;" (i.e., compiling this library will return a "true" value).

Values from the questionnaire data stream can be passed to these functions and results returned to CallWeb variables through CALCUL questions as in the following example: Q3 = somefunction($Q1,$Q2) which provides the function named "somefunction" with the current values of questions Q1 and Q2, and store a result in question Q3.


e-mail technical support!