0 votes
in SoSci Survey (English) by s075828 (290 points)

Thank you so much for the response.

Ok I followed the second option suggested by you without the combinations and have few questions regarding it.

Initially i created a QN01 and later carried out below steps.

  1. I imported two decks (Testdeck1,Testdeck2) without the headers as below

decks

  1. Later created the Random Generator as below

RG02

  1. In the Questionnaire I used the below code.

    $i = loopPage(5);
    $textID = 'Test'.sprintf('%02d', $i + 1);
    $qID = 'QN'.sprintf('%02d', $i + 1);
    // Display question and text - like before
    $data = dbGet($textID);
    $text = $data[0];
    html('

    '.$text.'

    ');
    question($qID);

Questions

  1. Now when I previewed I did not get 5 questionnaires, instead I got 1 questionnaire with 5 Pages. And also the question was only in the first page from second page it was giving an error : as below

error

So, what should I change in order to get multiple questionnaires each having same question but different vignette text. I think in my previous post i wrongly mentioned the format as

Question 1(EmployeeInfo Deck1)
Answer1

It should be actually like say for 3 questionnaires

Questionnaire 1:

EmployeeInfo Deck1 - Vignette Text 1
Question 1
Answer1

Questionnaire 2:

EmployeeInfo Deck1 - Vignette Text 2
Question 1
Answer1

Questionnaire 3:

EmployeeInfo Deck1 - Vignette Text 3
Question 1
Answer1

Sorry again for my long post.

Thank you.

by SoSci Survey (302k points)
Here're some questions I needed for an answer:
(1) What is QN01? What questions shall be shown for the second, third, etc. item of the deck?
(2) Which texts belong to which deck? It seems you didn't use the prefixes as I suggested in https://support.soscisurvey.de/?qa=734/retrieving-vignette-texts-for-the-questionnaire&show=736#a736?
by s075828 (290 points)
Sorry for using answer as a comment, but i was not able to insert images in comment. Please find the below reply for your comment.

Thank you.
by SoSci Survey (302k points)
> QN01 is the common question for the all the texts of Deck1

Alright - you need one question (or in this case better: one item) per vignette. if you have 10 vignettes per deck, I'd suggest to create 10 items in the polarity profile. This code takes care of displaying only one per page: question('QN01', $i + 1)

> Ok i followed the exact naming convention you used in the example.

Then I'd suggest to also use the modified PHP code to get the correct text ID. This should do the trick to display all 10 vignettes from the (randomly drawn) deck.
by s075828 (290 points)
Why am i getting this error - "Variable RG01 is unknown to this project (see listing of variables). Therefore no result can be retrieved." ?
by SoSci Survey (302k points)
You need a random generator - for my example code, I assumed it could have the ID RG01. Also see: https://www.soscisurvey.de/help/doku.php/en:create:randomization
by s075828 (290 points)
Thanks. I finally understood how Random Generator works. I have few more questions.

1. What if i add two different decks with different number of texts in each deck, say one has 10 and the other 8. how to use loop then ?

2. How can i assign the questionnaire of each loop to multiple respondents ? I do not see a questionnaire ID for each loop.

I really appreciate you for answering all my questions.I am currently doing my Master Thesis, So I am having a lot of questions. Once I am done with my thesis, I would like to help others who would want to perform these tasks by making a video tutorial of the steps I carried out to accomplish the output and provide it in the forum.
by SoSci Survey (302k points)
> 1. What if i add two different decks with different number of texts in each deck, say one has 10 and the other 8. how to use loop then ?

This might be easier to accomplish by putting the combinations into the elements of the random generator. But it's also possible to do it with the no-combinations solution. Just use dbKeys() to count the number of entries in the database for contents, having a specific prefix (=your deck name/prefix, e.g., "D1").

> 2. How can i assign the questionnaire of each loop to multiple respondents ? I do not see a questionnaire ID for each loop.

The random generator will randomly assign one of the decks to each respondent. By default, it takes care that each deck will be chosen equally often.

> Once I am done with my thesis, I would like to help others who would want to perform these tasks by making a video tutorial of the steps I carried out to accomplish the output and provide it in the forum.

That would be great. There are already some tutorial videos from SoSci-users on YouTube, and there's also the plan to make some "official" tutorials on different topics. Unfortunately, we did not find the time for that in the recent years :(
by s075828 (290 points)
I wanted to test the mailing list option just for myself. But It asked for university email, I registered with my university email. I just wanted to know do I have to pay for testing ?
by SoSci Survey (302k points)
No, you neither pay for testing (testing project), nor for academic use (free project). As long as no conpany is involved in the project.
We just need a university email address (or a copy of your ID card) to ensure it's you whose name is set in the account - and not someone who wants to abuse SoSci Survey to send spam in your name.
by s075828 (290 points)
Ok thank you for the information.
by s075828 (290 points)
> This might be easier to accomplish by putting the combinations into the elements of the random generator. But it's also possible to do it with the no-combinations solution. Just use dbKeys() to count the number of entries in the database for contents, having a specific prefix (=your deck name/prefix, e.g., "D1").

I am facing an issue. I want to have 2 vignette text in same page one from Deck 1 having 10 texts and another from Deck 2 having 8 texts. I tried it in two ways.

1. I use loop in both the PHP code 10 times, It shows error for second deck saying there is no 9th entry found.

2. In case I used loop 10 times for Deck 1 and 8 times for Deck 2 then the questionnaire comes to an end after 8 loops.

How to go about this ?
by SoSci Survey (302k points)
> I am facing an issue. I want to have 2 vignette text in same page one from
> Deck 1 having 10 texts and another from Deck 2 having 8 texts.

I don't understand this: Shouldn't the questionnaire use either Deck 1 or Deck 2?

I think it would be helpful, if you created a new question, and include the PHP code, the random generator, and a sample of your databank contents. Also write what's already working well. This would be much easier to follow than the comments. Thank you.

1 Answer

0 votes
by s075828 (290 points)

Had to use answer because I was not able to insert images using comment.

(1) What is QN01? What questions shall be shown for the second, third, etc. item of the deck?

QN01 is the common question for the all the texts of Deck1. As you can see above the Question 1 remains the same but only the Vignette Text are varying. I have given below exactly how I would liek to have.

Questionnaire 1:

(Vignette Text 1 from EmployeeInfoDeck1) A 20 year old man is a fresher and takes lots of break during work hours

(Question 1) Is the behavior of your co-worker as expected, or is it in your opinion
acceptable or not acceptable?

(Answer Scale1) Acceptable---In Between---Not Acceptable

(Vignette Text 1 from CompanyInfoDeck1) The company is accepting freshers without having a Degree

(Question 2) Is the company policy Good or Bad ?

(Answer Scale2) Good---In Between---Bad

Questionnaire 2:

(Vignette Text 2 from EmployeeInfoDeck1) A 40 year old woman is experienced and takes no breaks during work hours

(Question 1) Is the behavior of your co-worker as expected, or is it in your opinion
acceptable or not acceptable?

(Answer Scale1) Acceptable---In Between---Not Acceptable

(Vignette Text 2 from CompanyInfoDeck1) The company is not accepting experienced candidates without a degree and 5 years of working experience

(Question 2) Is the company policy Good or Bad ?

(Answer Scale2) Good---In Between---Bad

(2) Which texts belong to which deck? It seems you didn't use the prefixes as I suggested

Ok i followed the exact naming convention you used in the example. I have attached the entire process below.

  1. I created question :

question

  1. Imported decks (Deck 1 and Deck 2)

decks

  1. Created Random Generator RG01:

rg

  1. Created Questionnaire:

Qare

  1. when i previewed I got below errors:

err01

err02

Thank you.

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

...