Highlighted

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

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

25

Likes

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

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

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

26

Likes

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

Copy link to clipboard

Copied

Add a if after the last else.

Likes

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
Reply
Loading...