0 votes
in SoSci Survey (English) by s237955 (180 points)

Dear colleagues,

I would like to implement particular Psychological Questionnaire(s) in my project and want to send automatic emails via SoSci survey to those participants who obtain a specific score (let's assume 60-70%) on Psychological Questionnaire(s) or two groups of high and low score. I have gone through website and have seen that there is a possibility of online data evaluation on Pro server. Could you please let me know whether it is possible to evaluate and analyse score on a questionnaire online, assign groups with low and high scores and send automatic emails to participants with specific cut off score on a particular questionnaire? Which Pro Server package would be useful for this purpose? We aim to recruit about 100 participants.

Thank you and looking forward to your response.

Best regards

2 Answers

+1 vote
by SoSci Survey (309k points)
selected by s237955
 
Best answer

Basically, you just need a PHP filter and the function mailSchedule().

if (valueMean('AB01') > 3) {
  mailSchedule(false, 1);
}

This code, for example, will send the current respondent (given that the system knows his/her email address) the mailing with ID=1 in case that the scale mean of AB01 is above 3.

No special package is required in SoSci Survey for simple filters and sending emails.

by s237955 (180 points)
Thanks a lot for your prompt response. I'll try this option and will get back to you in case of further quests.
0 votes
by s237955 (180 points)

I am trying to compute sum of a scale writing the code $sum = valueSum('UP'); in PHP Functions option. Then I run a pretest but it doesn't compute/show sum in the Collected Data: View Data option as in the attached screenshot. What could be wrong?

by SoSci Survey (309k points)
The code valueSum('up') won't work. According to the specs valueSum() expects the ID of a question or a list of variable IDs. What question type are you using for UP01 etc.?

If these are simple (non-multiple-choice) selections, try this one:

valueSum(['UP01', 'UP02', ... 'UP15']);

or

valueSum(getQuestions('UP'));

For details see
https://www.soscisurvey.de/help/doku.php/en:create:functions:valuesum
https://www.soscisurvey.de/help/doku.php/en:create:functions:getquestions
https://www.soscisurvey.de/help/doku.php/en:create:array
by s237955 (180 points)
Question types: Likert scale (1 to 4) > Horizontal selection. It won't compute the whole sum of the scale and I have to go question wise in an array?
by SoSci Survey (309k points)
If you are using a horizontal selection the above code willl work. Yet, the valueSum() function works much easier, if you place all scale items in a "scale" question. Note, that you can configure a fully labelled scale to display each item separately (very similar to a bunch of horizontal selections).
by s237955 (180 points)
I have created a new Fully labelled scale but again it's not computing and showing the sum. Tried all above suggestions, not sure where I'm doing a mistake.
by SoSci Survey (309k points)
You know that you need some output function to actually show the sum, right? debug() is a very valuable function for that.

$sum = ...
debug($sum);

What does your PHP code look like, and what does the debug information say? See https://www.soscisurvey.de/help/doku.php/en:create:debugging
by s237955 (180 points)
So, I used the following sum and debug code in PHP function below the BI01 scale. If I run pretest in debug mode and any of the items miss an answer, it will compute the sum in debug mode. But when the scale is fully (100%) answered it doesn't show sum either in debug mode or data file.
  
$sum = valueSum('BI01');
debug($sum);
debug(): $sum = 102 (double)
by SoSci Survey (309k points)
> But when the scale is fully (100%) answered it doesn't show sum either in debug mode or data file.

So, I guess you might have placed the valueSum() on the same page like question BI01? That won't work, because then valueSum() runs before you have entered your answers. In that moment every item is missing.

Please place any value() or valueSum() or valueMean() commands on the page AFTER the question to analyze or later.
by s237955 (180 points)
Thanks a lot for your time. Indeed the PHP function for sum was on the same page.
After putting it to the next page it does one part to show sum in the debug mode, but again it doesn't store sum in the Collected data file. Is there any save data command/ PHP function?
Apologies for my so many quests, merely an infant to SoSci survey platform:)
by SoSci Survey (309k points)
> Is there any save data command/ PHP function?

Please use the function put() for that. You will also need an "internal variable" to store the value to.
by s237955 (180 points)
Perfect, finally it worked with this piece of code:
$sum = valueSum('BI01');
put('BI02_01',$sum);

Thanks once again. I'll get back in case of follow up quests.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...