• Resolved mikelalgas

    (@mikelalgas)


    Hello, I want to enter the result of a calculated field in a number field.

    I have filled the Predefined Value field with filenameX. Is it necessary to add a code like this example that I show you? SHOW(filenameX)

    Thanks

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

    (@codepeople)

    Hello @mikelalgas

    Thank you very much for using our plugin. When the plugin generates the number field the equations associated with the calculated fields have not been evaluated yet. So, the default value of the number field will be zero or empty.

    The alternative would be to assign the equation result to the number field from the same equation.

    I’ll try to describe the process with a hypothetical example.

    Assuming you have the calculated field fieldname1 with the equation fieldname2+fieldname3 and you want to assign the result to the number field fieldname4

    Please, edit the equation as follows:

    (function(){
    var result = fieldname2+fieldname3;
    getField(fieldname4|n).setVal(result);
    return result;
    })()

    The plugin replaces the fields’ names in the equations with their corresponding values before evaluating them. The |n modifier tells the plugin you want to use the field’s name instead of its value.

    Best regards.

    Thread Starter mikelalgas

    (@mikelalgas)

    Solucionado! Muchas gracias por la explicación y por este plugin, me parece magnífico.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Number / Predefined Value / It is possible to use another field in the form as p’ is closed to new replies.