How to Filter Topics By Topics

 

Overview

Filter Topics By Topics is a basic method for filtering specific topics in a Multi-Topic Question (Single Choice Grid Question), according to answers selected in topics of another Multi-Topic question.

How to Do It:

  1. First, let’s create two Multi-Topic Questions.
    The first question, for our example, will have 4 topics, each one can be selected with an answer ‘true’ or ‘false’:

     

  2. Our other question, will have the same amount of topics, with a different set of answers:

     

  3. Now, let’s configure the Filtering script, we will need to write it in the start script in the question we want to filter – so lets choose Question 2, to be filtered according to question 1.

     

    I have written the following script, in the start script of question 2:
    FilterTopicsByTopics(CurrQues,1,1);

    1st Parameter: The Target Question.

    2nd Parameter: The Source Question.
    3rd Parameter: Index’s of answers from the source question. (Can add several values and separate them with a comma)

     

    This will basically show only topics that their corresponding topics in question one, were answered with answer 1, ‘true’.
    For example, In question 1 I answered ‘true’ for topics 2 and 4:

    And now, in question number 2, I get only topics 2 and 4:

  4. If you wish to show topics that were NOT answered with the values you specified, you should change the script to be like this:
    FilterTopicsByTopics(CurrQues,false,1,1);

    1st Parameter: Target Question.

    2nd Parameter: ‘false’ for doing the negative function.
    3rd Parameter: Source Question.
    4th Parameter:
     Index’s of answers from the source question. (Can add several values and separate them with a comma)


    And as you can see, this will bring the topics which did NOT have the values we specified:

That’s it!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.