Skip to main content
October 6, 2016
Question

Having a combo box determine the calculated value of a text field

  • October 6, 2016
  • 0 replies
  • 359 views

I have a combo box with a set # of fields that I need to be able to set the value of a text field. I have gotten the text box to update to the VALUE of the combo box using the following:

var MOD = this.getField("STR01").value;

event.value = MOD

What I cannot figure out is how to set an IF statement to have it set a different value based on whats selected in the combo box... the relationship should look as follows:

Combo Box ValueText box Value

1

-5
2-4
3-4
4-3
5-3
6-2
7-2
8-1
9-1
100
110
12+1
13+1
14+2
15+2
16+3

17

+3
18+4
19+4
20+5
21+5
22+6
23+6
24+7
25+7
26+8
27+8
28+9
29+9
30+10

Any idea's would be greatly appreciated!

This topic has been closed for replies.