Debugging formula and calculations
Cxoice offers a lot of power for using formulae and calculations. However, the more complex the calculations, the more challenging it is to check and debug. Cxoice allows you to use %%DEBUG[...] in place of %%[...] which will then show the formula and calculations.
For debugging in the ‘Test/Preview’ mode, the web-browser ‘Inspect’ option in Web-developer tools will show the calculations and results when using Test.
For Online testing, %%DEBUG will show the calculations inline with the question text (obviously this will need to be removed before the survey goes live).
If you are generating critical calculations that affect what the questionnaire will show - for instance price calculations that vary according to previous answers - then we recommend using the Derived variable type to save the calculated data with the survey data. Derived questions can also include lists to capture exactly what was shown.
For online Cxoice account holders, further testing and checking can be done using the Simulate Data options in the Project Workspace Area. These allow you to generate data which will be stored against the questionnaire and can be viewed and checked. Where there is a lot of routing or skip patterns, Simulate Data will also show the pages of the questionnaire for each simulated route. This helps check logic and wording where many different groups are flowing through different sections to make sure the sections are consistent.