Multi-mode: How to block a Web contact when it has been switched in Cati?

Multi-mode: How to block a Web contact when it has been switched in Cati?


The article explain how to block a web respondent in case of multi-mode survey

Applies to askiadesign
Written for Scripters and Data Processors ; beginners

script; askiascript; multi-mode; webprod;switch

If you're running a multi-mode survey, you may need to block a contact on web side, when you have switched  it back to Cati. 

The first thing you need to know is that Webprod has it own survey data database (named WebInterviews) where interview data is stored for each survey. Here how it works:


1 - Web survey only

Web interview data is sent in real time from Webprod (WebInterviews) to Cca (Surveys).


2 - Interview started in Cati then a link to the web survey is sent from Cati

Cati Interview data is sent from Cca (Surveys) to Webprod (WebInterviews) and the contact is blocked on Cati side.


3 -  Interview started in Web and switched back to Cati

Web Interview data is sent to Cca (Surveys). But the link to the web survey is still available. 


Here how to deal with case 3. For that, you need to get two informations:

- The SQL link to the WebInterviews database

- The name of the WebInterviews table for your survey.


Then, in Design, you need to:

1 - Import the Guid

The Guid is the unique identifier accross all data collection modes. This Guid is used in various places in our databases.

Create a "Guid" open ended question. And, with a routing at the very start of the survey, specify the Interview.GUID in it. There is a small subtlety as the Guid value specified is surrounded with brackets, while, on askiafield tables, that's not the case:


In your specified value, you will nee to remove these brackets with the following syntax:


Now you have a value that can be used in SQL queries.


2 - Update the WebInterviews survey table

Add a Start SQL Query at the end of your survey.

DSN is your SQL link to WebInterviews table:

Provider=sqloledb;Data Source=[YourSQLServer];Initial Catalog=[YourWebInterviewsDatabase];Trusted_Connection=no;User Id=[YourSQLLogin];Password=[YourSQLPassword]


Update [YourWebInterviewSurveyTable] Set IsCompleted=1, IsSentToCca=1 where Guid='??[YourGuidQuestion]??'



With The IsCompleted tag in Webinterview set as True, the respondent cannot use anymore the DoPanel link. He will get a "laready compelted" final page.


Have more questions? Submit a request


  • Avatar
    Denis Bodin

    Hi Yannick,

    Thank's for that !

    Could we use this on a event on a contact list ?
    The GUID parameter doesn't appear but can we use it at this place ?


  • Avatar
    Yannick Abbe

    Hello Denis,
    Pour l'event on list, that's not possible for now. That's on our roadmap (having an event on switch).
    And for now, the GUID parameter is the only parameter we easily can use in a SQL query (For now we cannot get, into a survey, the combination between ListId and ContactID that we could also use into the SQL query).



  • Avatar
    Denis Bodin

    Ok, thank you Yannick.