• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

field calculations

Participant ,
Apr 27, 2017 Apr 27, 2017

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.

TOPICS
Create PDFs

Views

552

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Apr 27, 2017 Apr 27, 2017

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;

View solution in original post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2017 Apr 27, 2017

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 27, 2017 Apr 27, 2017

Copy link to clipboard

Copied

Excellent, thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 27, 2017 Apr 27, 2017

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)...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 27, 2017 Apr 27, 2017

Copy link to clipboard

Copied

LATEST

Yes, I figured that. Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines