Copy link to clipboard
Field name: box1, box2, box3
Box3= smaller number box1 or box2 multilply by 0.3489.
How to write the script for box3 please?
Please be more specific, what do you mean by smaller number? And what do you mean by "box"; a textfield object? a dropdown menu object? a listbox?
Did you mean to ask that you're looking for someone to write a script for you and with that code be able to evaluate which texfield has a value greater than the other field's value?
And whichever value is not greater than the other then multiply by 0.3489 and display that tesult in a third textfield?
Where do you need this event to execute from? Do you want to run the code as a custom calculation script in the third texfeld where the total value will be displayed?
Are you goin to run the code as a mouse-up event from clicking on a button?
Are there other fields' events interacting with the total that will be displayed in that third field object?
Multiply the smaller of box1 or box2 by 0.3489
Try67 got it thanks!!!
Use this code as the custom calculation script of "box3":
var v1 = Number(this.getField("box1").valueAsString);
var v2 = Number(this.getField("box2").valueAsString);
event.value = Math.min(v1,v2) * 0.3489;
It works thanks!!!