Is it possible to multiply two fields, divide the result by a set number and then calculate the square root?
or do you have to be able to use Java script? I am not a programmer!
Yes, you'll need to use JavaScript. Here's some code you can use as the custom calculation script for a field that adapt to suit your needs:
// Get the field values, as numbersvar v1 =+getField("Text1").value;var v2 =+getField("Text2").value;// Multiply the two values and a constantvar product = v1 * v2 /42;// Calculate the square rootvar sr = Math.sqrt(product);// Set the value of this field to the resultevent.value= sr;
This can all be simplified to:
// Get the field values, as numbersvar v1 =+getField("Text1").value;var v2 =+getField("Text2").value; event.value= Math.sqrt(v1 * v2 /42);
You'd replace "Text1" and "Text2" in the code above with the names of your two fields, and place 42 with the number you want to use.
This can all be simplified to:
You'd replace "Text1" and "Text2" in the code above with the names of your two fields, and place 42 with the number you want to use.
George