• Resolved PB

    (@ohtusabes)


    Hi @codepeople2

    I would like to display different text strings in fieldname43 based on the value of fieldname12. However, it only responds correctly when the value is 0—other values do not trigger the expected output. Could you please help me find a solution?

    Thanks in advance

    The page I need help with: [log in to see the link]

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

    (@codepeople2)

    Hello @ohtusabes

    Could you please share the equation’s code to check the issue?

    Best regards.

    Thread Starter PB

    (@ohtusabes)

    Hi @codepeople2

    The code is as follows:

    (function(){
    var x = Number(fieldname12);
    if (x === 0) return 'Controlar cada 2 horas';
    if (x >= 1 && x <= 4) return 'Controlar cada 4 horas';
    if (x >= 5) return 'Controlar cada 6 horas';
    return '';
    })()

    Thank you.

    Plugin Author CodePeople2

    (@codepeople2)

    Hello @ohtusabes

    Your equation is correct and functions perfectly. However, note that fieldname43 was configured to depend on the value of fieldname12. Specifically, in fieldname12, you set a dependency to activate fieldname43 only when fieldname12 equals zero. Then, in the equation for fieldname43, you reference fieldname12, creating a cross-reference that invalidates your equation.

    Please remove the dependency from the fieldname12 field’s configuration to resolve this issue.

    Best regards.

    Thread Starter PB

    (@ohtusabes)

    Hi @codepeople2

    You’re right. I tested a dependency while exploring the options and inadvertently left this one in.

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘conditional’ is closed to new replies.