Copy link to clipboard
Copied
I have field 1, user types in a number of days. I want the number of days divided by 1300 and for the answer to appear in another field.
So field one shows 166 the field beside it would have the 1300 / 166.
Field 1 number is the number of words to be translated.
Field 2 is converting that number of words to number of days it would take if 1300 words a day could be translated.
Example; Field 1 says 650 field 2 would say .5 (because it would take .5 of a day to translate 650 words.
Copy link to clipboard
Copied
If the first field is called "Words", enter this code as the custom calculation script of the second field:
var words = Number(this.getField("Words").value);
if (words==0) event.value = "";
else event.value = 1300/words;
Copy link to clipboard
Copied
If the first field is called "Words", enter this code as the custom calculation script of the second field:
var words = Number(this.getField("Words").value);
if (words==0) event.value = "";
else event.value = 1300/words;
Copy link to clipboard
Copied
Excellent, thanks
Copy link to clipboard
Copied
PS. your description of the calculation and the result you want to get are conflicting... If you want the result to be 0.5 when "words" is 650 then it needs to be (words/1300), not (1300/words)...
Copy link to clipboard
Copied
Yes, I figured that. Thank you