So, for example, if a character is a "Fighter", they will have, say, 10 hit points, but if they are a "Cleric", they might have 8 hit points.
So I have a field, called "Class". It has a drop-down list of values: Fighter, Cleric, Rogue, and Wizard.
I have another field, called HitPoints. I went to the custom calculation, and have this:
var nClass = this.getField("Class").value;
if( nClass == "Fighter" ) event.value = 1;
else if( nClass == "Cleric" ) event.value = 2;
else if( nClass == "Wizard" ) event.value = 3;
else event.value = 0;
Try adding a line that outputs the value of nClass to the console or to an
That would help you debug the problem.
I created a bogus text field, and tried doing a show.console() and outputting it on a trigger, but I obviously don't know what I'm doing.
If you could show me a best practice for doing that, I would be most appreciative.
will write it to the console.
will display it in an alert window.