I'm trying to create a function that will populate a set of text fields [NSave] based on the results of another set of (pre-existing) text fields [NStat] with the click of one button. Easy enough to do for one or two numbers but when I tried it for 8 unique fields [ASave], [BSave], [CSave], etc. etc. etc. it displayed some really erratic behavior. Namely it fluctuated between populating some of the fields or all of the fields. This is a sample of the Action Commands I used for one set:
If "[StrResult]" "=" "18"
SetVar "[StrSave]" "8"
Else
If "[StrResult]" "=" "17"
SetVar "[StrSave]" "9"
Else
If "[StrResult]" "=" "16"
SetVar "[StrSave]" "10"
Else
If "[StrResult]" "=" "15"
SetVar "[StrSave]" "11"
Else
If "[StrResult]" "<=" "14"
SetVar "[StrSave]" "12"
EndIf
Is there a better way to do this for 8 different sets of variables so I can execute the function with one click? Each "set" needs to use the same number range as the code above. I hope that makes sense.