• Resolved rafaelyiemm

    (@rafaelyiemm)


    `Please help me to create a formula.

    The configuration of the form is as follows:

    <strong>field name11</strong>
    It is a checkbox with text option, and with value option.
    If the checkbox (fieldname11) is selected, it shows another additional checkbox (fieldname12)

    <strong>field name12</strong>
    The “fieldname12” checkbox has 3 options, with three different numerical values ??(0.38954286, 0.47950002 and 0.51950004).

    <strong>field name 6</strong>
    It is an editable number, for the user to enter an amount (for example: €500)

    <strong>field name9 </strong>
    is the calculated field

    I need to generate the following formula in Calculated Field Form:

    fieldname9 = fieldname12 x fieldname 6 (<strong>according to the selected value</strong>) + 1.19

    Thank you very much.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @rafaelyiemm

    Thank you very much for using our plugin.

    The equation would be as simple as:

    fieldname12*fieldname6+1.19

    However, if fieldname6 is a checkbox field and not a radio button, and you have unticked the checkbox in its settings that merge or sum the values of ticked choices’ values, the equation need to be edited as follows:

    fieldname12*SUM(fieldname6)+1.19

    Best regards.

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    I also thought it was like that. But the formula doesn’t work.

    When one of the checkbox options is marked, the calculated field remains blank, without any result, and does not work correctly.

    Any solution?

    Thank you very much

    Plugin Author codepeople

    (@codepeople)

    Hello @rafaelyiemm

    Where can I test the form in action?

    Best regards.

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    Plugin Author codepeople

    (@codepeople)

    Hello @rafaelyiemm

    You’ve entered the following numbers as the choices values in the fieldname12 field:

    0,38954286
    0,47950002
    0,51950004

    However, in javascript, the decimal symbol for plain numbers is the point, not the comma.

    Please, edit the choices values as follows:

    0.38954286
    0.47950002
    0.51950004

    Best regards.

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    Muchas gracias.

    ?De qué manera puedo configurar que el resultado total solo aparezca cuando se selecciona el botón?

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    Thank you very much.

    How can I configure the total result to only appear when the button is selected?

    Plugin Author codepeople

    (@codepeople)

    Saludos @rafaelyiemm

    Si desea que las ecuaciones se evalúen al presionar un botón, debe desmarcar la casilla de verificación “Dynamically evaluate the equations associated with the calculated fields” en la pesta?a “Form Settings” y seleccionar la opción “Calculate” en la configuración del botón.

    Gracias.

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    Gracias.

    Y ya, para finalizar:) ?cómo podría establecer en el campo total el número de decimales (por ejemplo: 0,00, en lugar de 0,000000?

    Saludos.

    Plugin Author codepeople

    (@codepeople)

    Hola @rafaelyiemm

    Para ello debe utilizar la operación PREC como la operación más externa de la ecuación.

    PREC(X, Y) redondea el número X con Y decimales.

    Si desea el resultado con sólo dos decimales, deberá editar la ecuación de la siguiente manera:

    PREC(fieldname12*fieldname6+1.19, 2)

    Gracias.

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    Muchas gracias por todo

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    Hola.

    La formula que me dijiste funciona perfectamente

    PREC(fieldname12*fieldname6+1.19, 2)

    No obstante, me gustaría saber qué formula debo aplicar para la siguiente función:

    – Si se selecciona fieldname12, se muestra también fieldname19 (con su propio valor)
    – Me gustaría que se sumase fieldname12 y fieldname19, antes del resultado final.

    He probado con la siguiente fórmula, pero no funciona: PREC(fieldname12+fieldname19*fieldname6+1.19, 2)

    Plugin Author codepeople

    (@codepeople)

    Saludos @rafaelyiemm

    No se quien es fieldname19 en su formulario. No obstante si fieldname19 es un campo configurado como dependiente de las opciones del campo fieldname12, la ecuación:

    PREC(fieldname12+fieldname19*fieldname6+1.19, 2)

    Debería funcionar sin problemas.

    Gracias.

    Thread Starter rafaelyiemm

    (@rafaelyiemm)

    fieldname19 es un checkbox con dos opciones, cada una con su valor: 0.01946230 y 0.01335674, respectivamente.

    Estas opciones (las del fieldname19), se tienen que sumar al valor del fieldname12, en caso de ser seleccionadas, y después multiplicarse por fieldname6. Por último, se le deberá sumar 1,19-

    La fórmula que me has indicado no funciona correctamente: PREC(fieldname12+fieldname19*fieldname6+1.19, 2)

    Muchas gracias por todo.

    Plugin Author codepeople

    (@codepeople)

    Hello @rafaelyiemm

    The equation would be:

    fieldname12*fieldname6+1.19

    Best regards.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Help with formula’ is closed to new replies.