Code: Select all
// there are 6 traj fields (traj.0, and so on, up to traj.5)
// and 6 niv fields (same way, niv.0 to niv.5)
// , and a result field
var oAtzar = this.getField("traj").getArray(); // create the array
for (i = 0; i < oAtzar.length; i++) { // begin the loop
var tNom = oAtzar[i].valueAsString // define I'm looking for a word inside the array
if (tNom === "Jesuïta") { // if the word is the one I'm looking for...
var tNiv = this.getField("niv." + i) // check the niv field related to the traj field; same *i* value
event.value = 16 - 1 * (tNiv.value) // modify the result field (autocalculated)
} else {
event.value = 16 // no word, nothing happens
}
}
< /code>
Ich habe jedoch einige Probleme gefunden: < /p>
Es ändert das Ergebnisfeld nicht. Ich obwohl der Wert i