IdSurvey 7 implements important new features for the questionnaire scripting. The engine of the software has been completely redesigned and a few changes have been made in order to make both the syntax and the function of some of the features more straightforward.
Except for the function of the logic condition != different than and of the algebraic operators within strings that are not enclosed in single quotes, all the other breaking changes have been automatically converted during the IdSurvey upgrade.
Nevertheless, it is important to get to know the new syntaxes for a correct creation and editing of the questionnaires in the new version of IdSurvey.
Summary
IdSurvey 6 | IdSurvey 7 | Auto conversion | |
---|---|---|---|
Logic condition != “different than” | If it is used to compare a response code of a question not displayed, it gives true. | If it is used to compare a response code of a question not displayed, it gives false. | NO1 |
Algebraic operators in strings not enclosed in single quotes | Even if you use an algebraic operator within a string, you can omit the single quotes.
| If you use an algebraic operator within a string, you always have to put it in single quotes.
| NO2 |
Given question and Date of Birth field | Multiple formats accepted | Accepts only ISO format yyyy- mm-dd (Year Month Day) | Not necessary |
Additional values of the contact | Manageable in reading mode with the Contacts Data Repository tool. | Manageable in reading and writing mode with EndlessField (custom fields). The feature Contacts Data Repository is deprecated. | √ |
Arithmetic expression (ARITH) | if( ARITH(([Q3]+[Q4])*[Q2]) <= 100 ) | if( ([Q3]+[Q4])*[Q2] <= 100 ) | √ |
ContainsText | if(ContainsText [Q1],’mare’==1) | if(ContainsText ([Q1],’mare’)==1) | √ |
CountCode | if(CountCode Q1 >= 3) | if(CountCode (Q1) >= 3) | √ |
CountResponsesWithCode | if(CountResponsesWithCode Q1,Q2,Q3,Q4,Q5,Q6,1 >= 3) | if(CountResponsesWithCode (Q1,Q2,Q3,Q4,Q5,Q6,1) >= 3) | √ |
CountResponsesWithText | if(CountResponsesWithText Q1,Q2,Q3,Q4,Q5,Q6,'mare' >= 3) | if(CountResponsesWithText (Q1,Q2,Q3,Q4,Q5,Q6,’mare’) >= 3) | √ |
CheckQuota | if(CheckQuota 'Genitori' == 1) | if(CheckQuota (‘Genitori')== 1) | √ |
Comparedate | if(Comparedate [Q1],[Q2]==1) | if(Comparedate ([Q1],[Q2])==1) | √ |
Goto | goto Q45 | goto (Q45) | √ |
Goto Rnd | goto rnd ‘Q11,Q12,Q13,Q14’,Qz | goToRnd (Q11,Q12,Q13,Q14,Qz) | √ |
1 If you use filters with != in the questionnaires created with IdSurvey 6, please check that the new function on IdSurvey 7 is the one you expect. For further details please go to the section related.
2 If in questionnaires created with IdSurvey 6 there are logic conditions or “update contact field” with strings that are not enclosed in single quotes and that contain one or more algebraic operators (+ – * /), always make sure to add single quotes. For more information please go to the related paragraph.
Details
Logic condition != “different than”
On IdSurvey 7 the behavior of the filters has been standardized by improving the logic condition =! different than.
On IdSurvey 7, if you use the condition different than to compare a response code of a question the was not displayed, the condition set is false, while it is true on IdSurvey 6.
Even though this specific behavior of the condition different than was usually undesirable on IdSurvey 6, it is possible that it has been used improperly.
Before starting a new survey on IdSurvey 7 that was coded on a previous version, please make sure to check the correct functioning of the filters that use different than. In particular, make sure to check the conditions with different than that refer to conditioned questions.
IdSurvey 6 | IdSurvey 7 | |
---|---|---|
Example | Q1 Question text 1 Yes 2 No √ Q2 /F “if(Q1==1)” Q3 /F “if(Q2!=1)” | Q1 Question text 1 Yes 2 No √ Q2 /F “if(Q1==1)” Q3 /F “if(Q2!=1)” |
Flow |
|
|
Explanation | IdSurvey 6 makes sure that the answer to question Q2 is different than 1, ignoring whether the question was asked to the respondent. | IdSurvey 7 makes sure whether question Q2 was asked or not in the first place. If not, the condition always gives false and therefore question Q3 will not be displayed. |
Algebraic operators in strings without single quotes
In IdSurvey 7 we added the feature that allows you to write algebraic operations without the use of dedicated functions. Any value combined with a sign -, +, * or / is processed as a mathematical operation.
When you want a value to be interpreted as a text, even if there are mathematical signs, you have to write the strings in single quotes.
In IdSurvey 6 you could update a contact field with the age range (for example 18-30) without using single quotes. In this case, IdSurvey 7 would write the result of the subtraction (-12) instead of the string 18-30. If you write the age range enclosed in single quotes (’18-30’), IdSurvey will always interpret the value as a regular text string.
IdSurvey 6 | IdSurvey 7 | |
---|---|---|
Example 1 | if({Profession}==ex-owner)
orif({Profession}==‘ex-owner’) | if({Profession}==ex-owner) The logic condition calculates ex minus owner – giving zero – and it checks if the field Profession is populated with zero.
The logic condition checks if the field Profession is populated with ‘ex-owner’. |
Example 2 | /UF “{Field1}==18-30)"
or/UF “{Field1}==’18-30')” In both cases, Field1 is populated with ’18-30’. | UF/ “{Field1}==18-30)”
The logic condition calculates 18 minus 30 giving -12 and it checks if Field1 is populated with -12./UF “{Field1}==’18-30')" The logic condition checks if Field1 is populated with ’18-30’. |
Example 3 | if({city}==london)
orif({city}==‘london’) In both cases, the logic condition checks if the field city is populated with ‘london’. | if({city}==london)
orif({city}==‘london’) In this example there is no algebraic operator. Regardless of the single quotes, the filter checks if the field city is populated with ‘london‘. |
Explanation | IdSurvey 6 considers a string any text that appears after the comparison symbol of a logic condition or after the sign equal of an “update contact field”. | IdSurvey 7 considers a string only the text enclosed in single quotes.However, a string without single quotes is allowed if there are no blank spaces or arithmetical signs. |
Displayed question and Date of Birth field (Date values in ISO format)
On IdSurvey 7, the principle used for the date values has been standardized. The values that are registered from the date questions and the Date of Birth field are now using the ISO standard (yyyy-mm-dd), regardless of the type of visualization in use.
This ensures the correct functioning of the compare date function.
Multinumber management
Within IdSurvey 7, each CATI call outcome is associated to the specific number of the contact that was actually called (i.e., if a contact has both phone number and mobile, and the latter was called, the outcome will be assigned to the mobile number instead of the phone number, while still being shown in the call history for that contact and counting toward the total call attempts limit).
During the update, each outcome attached to the contact (such as appointments) will be associated to the first available number, following this order: phone number, mobile, other phone number, new phone number.
Additional values of the contact (Contacts Data Repository)
On IdSurvey 7, the tool “Contacts Data Repository” has been replaced with the “EndlessFields” feature.
This new feature allows you to import, create and manage a large amount of values directly from the contacts list, in a similar way to the normal management of the standard fields.
Unlike the Contacts Data Repository, which could be used exclusively on read-only mode, EndlessFields allows you to fully manage values as variables.
IdSurvey 6 | IdSurvey 7 |
---|---|
In order to recall a specific value contained in the repository, you had to enter the “key” code between the $ symbols. | In order to recall a data of a contact field, you have to enter the code in braces, as if you were recalling any other field of the contact. |
Examples: Display condition: if($numerofigli$ >0) Text Piping: You stated that you have $S07.1$ patients… | Examples: Display condition: if({numerofigli} >0) Text Piping: You stated that you have {S07_1} patients… |
Notes
- In order to ensure compatibility with the earlier versions of IdSurvey, the old syntax with the $ symbol is also accepted.
- Custom fields (EndlessFields) cannot contain special characters such as spaces, periods, dashes, etc…
- During the upgrade to IdSurvey 7, the keys and values of the Contacts Data Repository as well as the codes used in the filters and text piping of all the questionnaires will be automatically migrated in order to ensure the compatibility with EndlessFields. Any special characters will automatically be replaced with an underscore.
Arithmetic expressions (ARITH)
On IdSurvey 7, the ARITH function will not be available anymore.
On the display conditions, you will need to put the arithmetic operation in round brackets in order to add the arithmetic expressions.
IdSurvey 6 | IdSurvey 7 |
---|---|
if( ARITH(([Q3]+[Q4])*[Q2]) <= 100 ) | if( ([Q3]+[Q4])*[Q2] <= 100 ) |
In order to enter arithmetic operations in the TextPiping, for example in the text of a question, you will need to put the arithmetic expression between fs tags.
IdSurvey 6 | IdSurvey 7 |
---|---|
You said that you walked ARITH([D2.1]+[D2.2]) kilometers | You said that you walked <fs>[D2.1]+[D2.2]</fs> kilometers |
Note
- In the graphic interface is it possible to enter the arithmetic expression using the
button available in every text editor. In this case, the tag will be added automatically and you will only need to write the expression, such as:
[D2.1]+[D2.2]
Syntax of additional functions
On IdSurvey 7, the arguments of all the functions must be put in brackets. In the summary table you will find a syntax comparison of some advanced functions, between the previous and the new version of IdSurvey.