• Resolved Enno

    (@ewx)


    Hi! I would like to know how I can create a conditional logic depending on values in the matrix object (how satisfied are you with the following items).

    thanks
    Enno

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    The survey support in formulas and conditionals logis is still pretty basic, could you tell me what would you like to do?

    Thread Starter Enno

    (@ewx)

    Hi Edgar,
    thanks for your reply!

    There is one rating form (How satisfied are you…?) where you can enter different questions that can be rated with 1 to 5 for example.

    I would like to know if there is a conditional logic like
    IF question1 rated 1 – 3
    Or
    IF question2 rated >= 3

    But with your statement “it’s pretty basic” I assume that it’s not possible…?!

    Regards
    Enno

    Plugin Author EDGARROJAS

    (@edgarrojas)

    It is possible but since the support is very basic it is still difficult to create conditions that use the survey table.

    For example, if you have the default survey table (the table that is created when you drag the survey field into your form). You could create a ‘Formula’ conditional logic (section 3 of this tutorial:https://sfmanual.rednao.com/documentation/conditional-logic/doing-calculations-in-conditional-logics/) that display a field only when the ‘Support’ question is rated as ‘Very Satisfied’ like this:

    var values=$$field_rnField3$$.OriginalValues.values;
    for(var i=0;i<values.length;i++){
    if(values[i].QuestionLabel=='Support'&&values[i].ValueLabel=='Very Satisfied')
    	return true;  
    }
    return false;

    In the code bellow i am basically searching for the ‘Support’ question in my survey and checking if it was rated as ‘Very Satisfied’ if so i am returning ‘true’ which will trigger the conditional logic and would show the field that i configured.

    Regards!

    Thread Starter Enno

    (@ewx)

    Thanks Edgar! I think, this will help me!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conditional Logic with “how satisfied” table’ is closed to new replies.