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

trying to return a value entered to multiply by 200% if less then, 175% if less then, and so on..

New Here ,
Jul 02, 2020 Jul 02, 2020

Copy link to clipboard

Copied

i am trying to return a value entered in "VehicleTradeValue", If number is less then or equal to 6000, then multiply by 200%, if value is greater then 6000 but less then 9000 , multiply by 175% and so on..

the equation below adds 10%... not sure why....

 

var vtv = this.getField("VehicleTradeValue").value;
if( vtv <= 6000) event.value = (vtv * 2.0);
else if ( vtv <= 9000) event.value = (vtv * 1.75);
else if( vtv <= 11000) event.value = (vtv * 1.50);
else if( vtv <= 12000) event.value = (vtv * 1.40);
else if( vtv <= 13000) event.value = (vtv * 1.35);
else if( vtv <= 14000) event.value = (vtv * 1.30);
else if( vtv <= 17000) event.value = (vtv * 1.25);
else if( vtv <= 20000) event.value = (vtv * 1.20);
else if( vtv <= 24000) event.value = (vtv * 1.15);
else( vtv <= 200000) event.value = (vtv * 1.10);

TOPICS
How to , PDF forms , Windows

Views

157

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 ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

LATEST

Add a if after the last else.

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