Filling a field with the contents of another field only when a condition is fulfilled
I am developing a PDF to aid in completing forms necessary for the expungement of criminal records. Most defendants have more that one case. Some have many more. Each PDF contains numerious petitions each followed by related order. Every 4 pages of the PDF a new petition and its related order begins.
Among other things, each petition and order has a Text field ("P1.Case.CaseNum") for the number of the case (which may be numbers and letters) and a drop down menu for the county of the court in which the case happened.
One particular county requires a separate document that lists all the case numbers of the cases from that county (That County's dropdown output is 056.) I have added this listing document to the end of the PDF.
I want a script for a field in this listing document that copies the case number from a petition only if the county involved is 056.
I have the following script that will ener Jefferson (if 056 is chosen in the dropdown) or Blank if it is not.
if((this.getField("P1.Case.County").value == "056")) this.event.value = "Jefferson" else this.event.value = " Blank"
What I can't do is replace "Jeferson" with something that will produce the case number that is entered in "P1.Case.CaseNum text" box of a petition. I think I have tried every conceiveable possible combination and have run out of ideas.
Thank you.
