Copy link to clipboard
Copied
This field is calculating correctly based on the value in equipment
the field name is LevelRate
var nEquipment = this.getField("equipment").value;
if (nEquipment<=49999)
event.value = .0550;
else if (nEquipment>=50000)
event.value = .0525;
I want to reference LevelRate in another field
if LevelRate is .0550 the new field VariableRate need to be .0574
I'm trying this but it's not working I tried calculation order and putting it in validate vs. calculate
this.getField("LevelRate").value
if (LevelRate=.0550)
event.value = .0574;
else if (LevelRate=.0525)
event.value = .0549;
Try this:
LevelRate = Number(this.getField("LevelRate").valueAsString);
if (LevelRate == .0550)
event.value = .0574;
else if (LevelRate == .0525)
event.value = .0549;
Copy link to clipboard
Copied
Try this:
LevelRate = Number(this.getField("LevelRate").valueAsString);
if (LevelRate == .0550)
event.value = .0574;
else if (LevelRate == .0525)
event.value = .0549;
Copy link to clipboard
Copied
I would also add this line at the end, just in case the result is neither one of those values:
else event.value = "";
Copy link to clipboard
Copied
Bernd,
This is brilliant, thank you so much. I'm a non-coder and just trying to hack it