Expand my Community achievements bar.

Dropdown menu picking what it wants on reopen of saved form

Avatar

Level 1

I have a dropdown menu with "codes" that equal our princing info

List Item          Value Given in Binding Tab

A-1                = .30

A-2                = .60

C-1                = .60

And so on. The issue is if I pick C-1 for a job, save the file and then re-open it. The dropdown switches to A-2 which is the same price, but wrong code for the job.

Does each value have to be different for the dropdown to stick with the right code? If I make each one different with a letter or something, the price x qty calculation will not work to give me my totals.

3 Replies

Avatar

Level 10

Usually the dropdown pickes up the first listitem matching with the value supplied while loading the form.

In your case you have two items with the same value. That's why it is always picking up the first one.

You can try this one.. Store the Dropdown selected text (not value) in a hidden field and then in the initalize event assign back the value to the dropdown.

To get the selected text from the dropdown use

     hidDropDownText.rawValue = DropDownList1.getDisplayItem(DropDownList1.selectedIndex);

In the initialize event of the hidDropDownText assign the text back to dropdown.

      DropDownList1.rawValue  = hidDropDownText.rawValue;

Thanks

Srini

Avatar

Level 1

Thank you for the coding, but with my code for the button can you show me where to put that?

es

<

field name="Code" y="257.175mm" x="88.9mm" w="28.575mm" h="9.525mm">

<

ui>

<

choiceList textEntry="1">

<

border>

<?templateDesigner StyleID aped2?>

<

edge/>

</

border>

<

margin/>

</

choiceList>

</

ui>

<

font typeface="Myriad Pro" size="9pt"/>

<

margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/>

<

para vAlign="middle"/>

<

caption reserve="7.8834mm">

<

font typeface="Myriad Pro" size="9pt"/>

<

para vAlign="middle"/>

<

value>

<

text>Code</text>

</

value>

</

caption>

<

items>

<

text>NO COST</text>

<

text>A-1 $0.30</text>

<

text>A-2 $0.60</text>

<

text>A-3 $0.40</text>

<

text>A-4 $0.45</text>

<

text>B-1 $0.60</text>

<

text>B-2 $1.20</text>

<

text>B-3 $0.70</text>

<

text>B-4 $0.75</text>

<

text>C-1 $0.60</text>

<

text>C-2 $1.50</text>

<

text>C-3 $0.70</text>

<

text>C-4 $0.75</text>

<

text>D-1 $0.65</text>

<

text>D-2 $1.85</text>

<

text>D-3 $0.75</text>

<

text>D-4 $0.80</text>

<

text>E-1 $0.50</text>

<

text>E-2 $0.80</text>

<

text>E-3 $0.60</text>

<

text>E-4 $0.65</text>

<

text>F-1 $0.80</text>

<

text>F-2 $1.40</text>

<

text>F-3 $0.90</text>

<

text>F-4 $0.95</text>

<

text>G-1 $0.80</text>

<

text>G-2 $1.70</text>

<

text>G-3 $0.90</text>

<

text>G-4 $0.95</text>

<

text>H-1 $0.85</text>

<

text>H-2 $2.05</text>

<

text>H-3 $0.95</text>

<

text>H-4 $1.00</text>

<

text>H-1A $0.40</text>

<

text>H-2A $0.70</text>

<

text>H-1B $0.20</text>

<

text>H-2B $0.50</text>

<

text>I-1 $2.40</text>

<

text>I-2 $4.80</text>

<

text>J-1 $4.80</text>

<

text>J-2 $9.60</text>

<

text>K-1 $7.20</text>

<

text>K-2 $14.40</text>

<

text>L-1 $10.80</text>

<

text>L-2 $21.60</text>

<

text>M-1 $14.40</text>

<

text>M-2 $28.80</text>

<

text>N-1 $18.00</text>

<

text>N-2 $36.00</text>

<

text>O-1 $21.60</text>

<

text>O-2 $43.20</text>

<

text>P-1 $25.20</text>

<

text>P-2 $50.40</text>

<

text>Q-1 $28.80</text>

<

text>Q-2 $57.60</text>

<

text>R-1 $32.40</text>

<

text>R-2 $64.80</text>

<

text>S-1 $36.00</text>

<

text>S-2 $72.00</text>

<

text>T-1 $1.20/SQ FT</text>

<

text>T-2 $2.40/SQ FT</text>

<

text>U-2 $5.40</text>

<

text>V-1 $1.25</text>

<

text>W-1 $1.40</text>

<

text>W-2 $1.70</text>

<

text>X-1 $1.55</text>

<

text>X-2 $2.15</text>

<

text>Y-1 $0.50</text>

<

text>Z-1 $0.15</text>

<

text>Y-2 $0.30</text>

<

text>AA-1 $0.30</text>

<

text>Z-2 $0.60</text>

<

text>ZZ-1 Custom Price</text>

</

items>

<

items save="1" presence="hidden">

<

text>0</text>

<

text>.30</text>

<

text>.60</text>

<

text>.40</text>

<

text>.45</text>

<

text>.60</text>

<

text>1.20</text>

<

text>.70</text>

<

text>.75</text>

<

text>.60</text>

<

text>1.50</text>

<

text>.70</text>

<

text>.75</text>

<

text>.65</text>

<

text>1.85</text>

<

text>.75</text>

<

text>.80</text>

<

text>.50</text>

<

text>.80</text>

<

text>.60</text>

<

text>.65</text>

<

text>.80</text>

<

text>1.40</text>

<

text>.90</text>

<

text>.95</text>

<

text>.80</text>

<

text>1.70</text>

<

text>.90</text>

<

text>.95</text>

<

text>.85</text>

<

text>2.05</text>

<

text>.95</text>

<

text>1.00</text>

<

text>.40</text>

<

text>.70</text>

<

text>.20</text>

<

text>.50</text>

<

text>2.40</text>

<

text>4.80</text>

<

text>4.80</text>

<

text>9.60</text>

<

text>7.20</text>

<

text>14.40</text>

<

text>10.80</text>

<

text>21.60</text>

<

text>14.40</text>

<

text>28.80</text>

<

text>18.00</text>

<

text>36.00</text>

<

text>21.60</text>

<

text>43.20</text>

<

text>25.20</text>

<

text>50.40</text>

<

text>28.80</text>

<

text>57.60</text>

<

text>32.40</text>

<

text>64.80</text>

<

text>36.00</text>

<

text>72.00</text>

<

text>1.20</text>

<

text>2.40</text>

<

text>5.40</text>

<

text>1.25</text>

<

text>1.40</text>

<

text>1.70</text>

<

text>1.55</text>

<

text>2.15</text>

<

text>.50</text>

<

text>.15</text>

<

text>.30</text>

<

text>.30</text>

<

text>.60</text>

<

text>.00</text>

</

items>

</

field>

Avatar

Level 10

It would be easier if you can post the form instead of XML Source.

Send the form to LiveCycle9@gmail.com

Thanks

Srini