These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Referencing Dynamic Table Items in LC/Java

CAMM
Registered: Nov 3 2010
Posts: 11
Answered

Hello,
 
I am working on additions to a form that contains a dynamic table that expands using add/delete button and contains several fields including:
 
MACHINETYPE
ACCESSORY
DESCRIPTION
PRICE
 
Previously, when you chose the ACCESSORY that you wanted form a drop down, the DESCRIPTION would populate:
 
topmostSubform.#subform[2].#subform[3].Table1.Item.ItemID::change - (JavaScript, client)
switch (xfa.event.newText)
{
case "100":
Descrip.rawValue = "Measuring Bracket";
break;
  
Now I wanted to add a simple test to see what the MACHINETYPE was (also coming from a drop down in the table)and set the PRICE accordingly. I thought it would be a simple change - I had figured a simple if loop looking at each of my 4 machine types and then assigning the PRICE. I'm having no luck with it - I can assign the PRICE directly with no issue:
 
switch (xfa.event.newText)
{
case "100":
Descrip.rawValue = "Measuring Bracket";
Price.rawValue = 10;
break;

  
...but can't seem to test the machine type and then assign.
I have searched this forum and re-checked out some tutorials and have looked at examples that covered situations that were close, but not exact to what I wanted to do, but things don't seem to be working for me. I'm probably missing something obvious, but I am looking for some help?!?
 
I'm using Live Cycle/Acrobat PRO 9.0.0
  
Thanks in advance!
    

CAMM

My Product Information:
LiveCycle Designer, Windows
CAMM
Registered: Nov 3 2010
Posts: 11
Accepted Answer
Just FYI....Answered my own question.......noticed some very strange behavior when making another change on this same form - text that should have populated a field through a "case" statement wasn't showing up?! Went back to the version of form previous to this and things worked....including my "if" statement inside the "case" of my drop down.
Something(not sure what) must have corrupted my form!

CAMM