0 votes
in SoSci Survey (English) by s152546 (190 points)
edited by SoSci Survey

Hello,
is its code for displaying as the text the items chosen after multiple filtering questions?
I have a list of items OS02

which are filtered consecutively with PHP codes

$act = getItems('OS02','<', 3) ;
question('OS03', $act);

$imp = getItems('OS03','>', 2) ;
question('OS04', $imp);

$pl = getItems('OS04','==', 1) ;
question('OS05', $pl);

and I would like the remaining items to be displayed at the page OS06 if the value is 1 (yes), but if no item is left after filtering another feedback text will be displayed
thank you

related to an answer for: How to make cascade filtering with PHP?

1 Answer

+1 vote
by SoSci Survey (304k points)

is its code for displaying as the text the items chosen after multiple filtering questions?

This code - if placed on three pages of the questionnaire - will display the Items, that received a response code <3 in OS02, in question OS03. Please note, that this may also include missing responses (-1 and -9 for example).

Then, ob the next page, question OS04 will only display the items that got a code >2 in OS03.

And, then again on another page, the question OS05 will display only those items that got the responde code 1 in question OS04.

but if no item is left after filtering another feedback text will be displayed

Assumming, you use the code

$items = getItems('OS05', '==', 1) ;
question('OS06', $items);

Then you can use a little filter to display a text, of none item remains:

$items = getItems('OS05', '==', 1) ;
if (count($items) == 0) {
  show('TX01');  // replace TX01 by the ID of your text
} else {
  question('OS06', $items);
}
by s152546 (190 points)
Thank you very much, it works well!
by s152546 (190 points)
Thank you very much for your help, the cascad filtering of the items works perfect, and the feedback message is ok.
Can items that have been left over for several previous pages appear as text (at the end of the question group)?
asked Aug 7, 2020 in SoSci Survey (English) by s152546 (190 points)
edited Aug 7, 2020 by SoSci Survey
display items together from different pages

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

...