Hi, Serban,
what kind of logic i can use on the equation question to count the responses at survey level.
There is no.
You can use an ajax call to query the database, or you may try to use the plugin
gitlab.com/SondagesPro/ExportAndStats/getStatInSurvey
with some additional javascript.
Here an example with the plugin.
In a group before your single question put a question of type "multiple short text" (QValues) with this javascript.
(Q1 is the single question you want to count)
Code:
<script>
$(document).on('ready pjax:scriptcomplete',function(){
// Identify this question
var thisQuestion = $('#question{QID}');
// Fill the fields, one line for each option
$('input[type=text]:eq(0)', thisQuestion).val( {'[Q1.nb.1]'} );
$('input[type=text]:eq(1)', thisQuestion).val( {'[Q1.nb.2]'} );
$('input[type=text]:eq(2)', thisQuestion).val( {'[Q1.nb.3]'} );
$('input[type=text]:eq(3)', thisQuestion).val( {'[Q1.nb.4]'} );
// Hide the question
$('#question{QID}').hide();
});
</script>
Here you store the values into the multiple short text.
Now the usual part to be able to use an array filter.
Before your question
put a question of type "equation" (eqHM) where you check the following question of type "multiple" (HM) if the value is still less than 5.
{HM_1=if(QValues_SQ001<5,"Y","")}
{HM_2=if(QValues_SQ002<5,"Y","")}
{HM_3=if(QValues_SQ003<5,"Y","")}
{HM_4=if(QValues_SQ004<5,"Y","")}
Now you set the array filter of your question on HM.
Have a look at the example.
Joffm