homefeaturesexamplesDOCUMENTATIONblogpricingcontact us
technical documentationCATI documentationcookbookrobot

Pushing data into a project during an interview


You want to place data or create a record in another project during an interview.


Create a CALCUL question using the put_values_in_case function.


Say you need to store events in an event-based CallWeb data base and you don't want to use a RELATION question (for example, you want to store purchases made by the respondent the previous day). You need a way to ask a few questions, store these answers in another project (purchase-based) and loop back to the purchase questions. The looping back is performed by a skip, but the storing is trickier; the put_values_in_case function performs it.

The syntax of put_values_in_case is as follows:

    AFFECTED_TELKEY = put_values_in_case(
      _proj => "some_project",
      _telkey => "some_telkey",
      AQ1 => $AQMx,
      Q3 => $QNy,
      Q10 => $QOz

The function put_values_in_case places the content of AQMx in the AQ1 field of the record identified by the _telkey "some_telkey" of project "some_project", as well as the content of QNy in Q3 and the content of QOz in Q10. There can be any number of such transfers in a single use of the function.The destination project is specified in the "_proj" key. Note that the function uses the Perl attribution operator (=>), NOT the equal sign.

If the data needs to be pushed into a particular record of that project, the _telkey of that record must be specified in the _telkey key. If no _telkey key is specified, put_values_in_case creates a new record in the destination project. If the destination _telkey is specified but does not exist, the function creates a record with that _telkey in the destination project. If a record needs to be created, the new _telkey contains 24 random letters and numbers unless a _pattern option was passed to the function; the _pattern option follows the "# Telkey pattern" syntax.

put_values_in_case returns the _telkey that was affected (i.e., the existing _telkey that was updated or the _telkey of the record that was created).


e-mail technical support!