Fill a combo box based on a different c/b to Acrobat 9 Pro

Greetings,

I followed the tutorials Parkers Thom and have tried several variations over the past two weeks, but all without success.

I am building a small form to work.  The form has a combo box that, based on the choice, fills a second.  In this case, the form allows patients planners choose a 'currentDiagnosis' (' Brain_Seizure', 'Brain_Tumor', etc.).  Based on the selection of a second combo Box is filled with codes CPT, "currentCPT" (for example '151.2', "152.2", etc.).

Document-level script

Master list of lists
Each entry of this listeral object is the name of a currentDiagnosis
Select the currentDiagnosis from the drop-down list box
The associated value is the list of the CPT, where each element is a code appropriate to the CPT, [< code >

]

var ocurrentDiagnosis = {}
Brain_Seizures: [["-"], ["150.1"], ["150,2"], ["150.3"], ["150,4"]],
Brain_Tumor: [["-"], ["151.1"], ["151.2"], ["151.3"], ["151,4"]],
Lung_nonSamllCell: [["-"], ["152,1"], ["152,2"], ["152.3"], ["152,4"]],
Lung_SmallCell: [["-"], ["153,1"], ["153.2"], ["153.3"], ["153,4"]]
};


function SetcurrentCPT()
{
If (Event.willCommit)
{
The list of CPT in the main list
Given that the selection is made,
Event.value contains the currentDiagnosis
var lst = ocurrentDiagnosis [event.value];


Clear the list of parts, if there is no parts for selected Assembly
If ((lst! = null) & & (lst.length > 0))


this.getField("currentCPT").setItems (lst);


on the other


{


this.getField("currentCPT").clearItems ();


}


}


}

Events of typing "currentDiagnosis".

setcurrentCPT();

The shape is complete with the exception of these two fields to cooperate (LOL).

All wiould help greatly appreciated.

Tim

System:

2.66 Intel Quad core

Video 1 GB 5700

8 GB Ram

Windows 7 64 bit

Adobe Acrobat 9 Professional

According to the code you have posted, the line:

setcurrentCPT();

Need to replace:

SetcurrentCPT();

or you can also rename the function to: "setcurrentCPT".

In addition, "Lung_nonSamllCell" is probably misspelled.

Tags: Acrobat

Similar Questions

  • Fill the combo box list dynamically

    I have a drop-down list box that is filled from a cluster table which is unbundled element with that I want to fill the drop-down list box. There are several types with the same element such as

    1-60mm

    1-60mm

    1-60mm

    1-60mm

    3-60mm

    3-60mm

    What I want to do is just see one 1-60mm and a 3-60 mm and when selected will get the value of the index view with thos types only in a table?


  • Combo Box Manipulation of external file

    I looked and looked and looked at can not find much info on it. And I do not get the case. My ultimate goal was to load values from a text file called "data.txt" which would be stored with the pdf form. But I can not even understand how to fill the combo box list via code. Can someone help me or tell me if it is possible to load the values from a text file?

    I have a drop-down list named 'ItemCode' area, but still I can't understand how to add items to the box through code only.

    Combo1.gifCombo2.gif

    I did it on Page 1 open but it never works for me for some reason that I can't understand.

    //-------------------------------------------------------------

    -Do not change the tags XML-

    //-------------------------------------------------------------

    < Page Actions >

    < ACRO_source > Page1:Page Open: Action1 < / ACRO_source >

    < ACRO_script >

    / * belongs to: Page-stock: Page1:Page open: Action1 * /.

    var ItemCode = this.getField ("ItemCode");

    ItemCode.clearItems ();

    ItemCode.setItems ("Test");

    < / ACRO_script >

    < / Actions page >

    < AcroForm >

    < ACRO_source > CopyBillAddy:Annot1:MouseUp:Action1 < / ACRO_source >

    < ACRO_script >

    / * belongs to: AcroForm:CopyBillAddy:Annot1:MouseUp:Action1 * /.

    var ABC = this.getField ("CopyBillAddy");

    var ST = this.getField ("Ship_To");

    var BT = this.getField ("Bill_To");

    If (CBA.value == 'Yes') {}

    ST.value = three.value

    } Else if (CBA.value == 'Off') {}

    ST.value = ST.value

    }

    < / ACRO_script >

    < / AcroForm >

    < AcroForm >

    < ACRO_source > Invoice_Number2: calculate < / ACRO_source >

    < ACRO_script >

    / * belongs to: AcroForm:Invoice_Number2: calculate * /.

    (/ * BVCALC Invoice_Number1 EVCALC **/event.value=AFMakeNumber(getField("Invoice_Number1").value)

    < / ACRO_script >

    < / AcroForm >

    The argument for the setItems method must be an array, not a string:

    ItemCode.setItems (["Test1", "Test2"]);

    For more information, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.752.html

    And also this tutorial: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle/

  • Additional mouse click required to set other combo box values based on the current selection combo box

    I have an Acrobat PDF form where there are 8 combo boxes (not editable) which are related in a logical way, but have unique names and a list of unique values, with the exception of a default value that represents 'null' or 'none '.

    for example:

    The first 1 combo box value is "none" followed by the value A1, B1, C1, etc., and Combo box 2 the first value is 'none' followed of the values A2, B2, C2, etc...

    The combined list useful values for every combo boxes relate to the types of unique product for the user to select mode 'radio button '.

    When the user selects one of the 8 Combo boxes and performs one selection other than 'none', then the form must verify the 7 other combo boxes and when any current value is not equal to 'none', he has to change 'None '.

    The following script is currently enrolled in the properties of "Actions - Mouse Run - Up a Javascript" from one of the drop-down list boxes, others have similar scripts as well.

    (var cbox is the current combo box and var obox is for other drop-down list boxes when called).

    Cbox var = this.getField ("TagStyleStake");

    If (cbox.value! = "none")

    {

    obox var = this.getField ("TagStyleBasket");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStylePushon");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleHandle");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleHang");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleBlank");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleMolded");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleSignage");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    }

    The current problem is that, when a Combo is selected and one option other than the 'none' value is clicked, the other combo boxes do not include the 'None' value.

    To reset the other combo boxes requires another click on the option which has just been moved to the position selected in the drop-down list, but it seems reasonable that the drop-down list boxes should reset with the initial click the option in the drop-down list.

    I tried other properties (Format, validate, Calculate) but without success.

    What I'm missing here?

    The normal way to proceed is to define "value option selected to validate immediately" and to place the code in the event of the combo box button. And instead of the first two lines you have, you need to use something like:

    If (! event.willCommit & event.changeEx! == 'none') {}

    Your other code goes here

    }

    The changeEx property returns the value of exports, if any, for the selected item.

  • Combo box that fills the text box

    Greetings,

    Any help is appreciated.  I have a combo box with four choices, regrdless of the choice you made, I would that the choice to be sent to a text field.  I tried a few things but am really lost on how to get this working.  I tried the code initially but the syntax is obviously fake, but I know the WTO Fixez_ the.

    function setchoice()

    {

    If (Event.willCommit)

    {

    var selection = this.getField("options").event

    This.GetField ("Textfieldchoice") .setItems (choice);

    }

    }

    Any help would be greatly appreciated.

    Sincerely,

    Tim

    If the user has not always need to interact with the text field, simply set the field read-only and use the following script in the custom text field calculation script:

    Script will count for the text field.

    Copy the value of the drop-down list box in this area

    Event.Value = getField("your_combo").value;

    Replace "your_combo" with the actual name of your combo box field.

  • Fill in a text box based on the list box selection?

    I'm relatively new to using scripts in forms.  So I hope that someone can help me here.

    I have a list box called 'Name', which uses the user selects a name.  I have a text box called "DOB", I need to be filled in automatically with the date of birth of the corresponding name that has been selected.

    I tried to adapt some scripts to fit my needs here, but nothing helps.  Although it seems like it should be pretty easy.  Any ideas?  Thanks in advance for the answers.

    ' 1. fill the list box with the name of "and place the date of birth in the option 'value exprot '.

    2. for action 'on blurr"add the following script:

    this.getField('DOB').value = event.value;

    When you tab or the mouse out of the list box, the value displayed in the field "DOB".

  • How can I update by program table combo box control type def?

    I use LV 8.6.1 and I am trying to create a table control panel object in which the user can select an item to list box for each element of the array.  I also have to periodically update the list of values.  Currently, I have configured the drop-down list box (selection of Automation sequence - see attached) as a type non-stricte def so I can write news channels to the list values when I need to.  But I can't seem to find a way to get the table (list of batches - see rasthaus) fill the new value drop-down list box.

    Automation box refelcts the new string sequence selection that I add programmatically, but the combo boxes in the batch list table control do not have the new channel.

    Anyone have any ideas?

    I have attached the screenshot of the drop-down list and table controls.

    Thank you

    Dan

    I considered that mention strings and values have a property that cannot be stored in a typedef, but when I tried it out, it seemed that it was.  So I just did not comment on that.  Maybe the strings and values may be among the typedef, maybe not.  The values of the controls certainly cannot.  Strings and values can be in kind of a gray area.  But you can certainly expect changes to a control to automatically update another control, because they are typedefs.  You cannot change the typedefs during execution.

    Let's put another example that has nothing to do with the values.  You have a regular typedef of a digital.  It is saved with the text in red in scientific notation.  You place two instances of this on your drawing.  You can programmatically change each other colors or other digital formats.  A change does not affect the other.  If it's a strict typedef, you would be locked in the way in which it was saved and could not change it programmatically.

    Take a look at this.  If you cannot programmatically, to update your channel list and values for a single combobox (a scalar string) you will be able to put up-to-date for when the combobox control is the data type for a table.  Simply get a reference to the element of the array.  It does not use typedefs anyway.

  • Channels not defined in Combo Box Bug?

    I found a problem with the drop-down list box control:

    1. create a drop-down list box and deselect 'allow Undefined Strings.

    2. run the VI

    3. Select a list box item

    4. press on the BACKSPACE key to remove a few letters of the item

    5. click on on the front panel

    The combo box is filled with a string not set!

    Disabling the BACKSPACE key is not a valid work-around because the user may need this while typing the value.  Expected behavior of the control would be to restore the previous value.  Any comments?

    Yes.

    Take a look at the bug report in this thread.

    http://forums.NI.com/NI/board/message?board.ID=170&thread.ID=379475

  • Combo box multiple values

    Hello world

    I would like to use a drop-down list box to send two different values for two entries for every combo box selection. For example if I select "Channel 1" form the drop-down list box, then the integer "1" and the string "1 x", which I can then send to the two separate terminals.

    I really have no idea how to do that, my one thought was to combine into a single value for the value of drop-down list box and then to cut the string and use it that way - but this seems awkward.

    See you soon!

    Instead of a combobox control, I'd probably use a ring.

  • How to make Player Mobile (IOS/Android) to fill the shape cells based on the entry in the other cell?

    Hi, is there a way to make Acrobat Reader Mobile (Android/IOS) to fill the shape cells based on entry into another cell?

    I did a time sheet were based on a code entry activity in a description drop-down list box that matches the activity code is displayed automatically in another cell. (see below)

    This works perfectly as long as I'm on a PC, however, does not work on any phone. (I guess that this feature is not yet supported on Acrobat Mobile)

    My question is if anyone can suggest an alternative method for characteristic mentioned that also works on phones?

    Any suggestion would be appreciated

    In the Format field:

    If (Event.willCommit)

    {

    Console.println (Event.value);

    Switch (Event.value)

    {

    case ' 1 01 ":

    this.getField("REMARK1").value = "unloading".

    break;

    case "2 01":

    this.getField("REMARK1").value = "preparing."

    break;

    .

    .

    .

    case "19 44":

    this.getField("REMARK1").value = 'Support-3rd part insp/contract.';

    break;   case "": ""

    this.getField("REMARK1").value = "";

    break;

    }

    }

    Sincerely: Robert

    Try to get rid of this console.println statement. If this does not help, it should work if you convert that from a script from the drop-down list format in a calculation of the field REMARK1 script.

  • How to fill a text box after selecting a drop down list?

    I have created a form that has a drop-down list with different types of products. After a person chooses a product in the menu I would fill the text box with a description of the product.  I'm a newbie here, but I thought that was far from using JavaScript to do this. But wasn't sure exactly where to put the code and do I have to put it on the text box or drop-down list. Any help would be appreciated Ive been looking everywhere for a week and can find an answer.

    If (xfa.event.newText == "")
    {TextField1.rawValue =""}

    "On your drop-down list by using Java Script on the * change event.

    If you have three items in your list:

    A

    B

    C

    If (xfa.event.newText == "A")
    {TextField1.rawValue = "You chose the letter A"}

    If (xfa.event.newText == "B")
    {TextField1.rawValue = "You chose the letter B"}

    If (xfa.event.newText == "C")
    {TextField1.rawValue = 'You chose the letter C'}

  • Another question of combo box

    (Thank you, Nadia, for the last answer)

    I have a ul (for the navigation button) that I want to WATCH the same thing on several pages, but the text and the links will be different.

    I made a template, but it wont let me save the list in a combo box.

    Is there a way to do this?

    TIA again

    Gretchen

    InwoodLady wrote:

    (Thank you, Nadia, for the last answer)

    You are welcome.  It would be useful to mark the question as 'responded' if the solution worked for you.  In the event that someone looking for the same problem, they can see that the answer was useful as a solution.

    I have a ul (for the navigation button) that I want to WATCH the same thing on several pages, but the text and the links will be different.

    I made a template, but it wont let me save the list in a combo box.

    I just tested this, and it worked for me:

    If you have your unorded already written in the code list, pass the background tag selector and select the

      tag.  This will select the entire list, and you should then be able to do the same thing as my previous answer and insert an editable region.,.

      I assume that you will be styling the "buttons" via CSS, do not use the DW navigation buttons.  (I hope you are going to use css ;-)

      Here's the code that DW writes when I added the editable menu list:

      
      
      • LINK
      • LINK
      • LINK
      • LINK
  • The selected text combo box.

    Hey people,

    I have this strange thing that happens with a drop-down list box. I use a loop to fill a table. The table is the data provider for a combo box. Everything works well except the first vaule of the table does not appear in the combo box as long as the selected value. I tried to adjust the index selected-1, 0, 1, but he never displays as soon as the page loads.

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML layout "'absolute' = initialize ="buildcombo (); » >

    < mx:Script >
    <! [CDATA]
    [Bindable] public var MyOptions:Array = new Array();

    private function buildcombo (): void
    {

    MyOptions.push ({}
    label: "- SELECT -", data: 0
    });

    for (var i: int = 1; i < 10; i ++)
    {
    MyOptions.push ({}
    label: 'OPTION' + i, data: I.ToString
    });
    }

    }

    private void reset (): void
    {
    MyOptions = new Array();
    buildcombo();
    }

    private void ShowValue (): void
    {
    trace (MyCombo.value);
    }

    []] >
    < / mx:Script >
    < mx:ComboBox id = "MyCombo" x = "325" y = "145" dataProvider = "{MyOptions}" change = "ShowValue (); "/ >
    < mx:Button = "362" x = "224" label = "Reset" click = "reset (); "/ >
    < / mx:Application >

    
    
    
         
            
        
        
        
    
    
  • Add items to the combo box when running

    In my program, I want to add int '34' "43", "17"... and let the user choose one of them to the drop-down list box. How can I add items to the combo box when running. Create a property node 'String [] '? I try that, but its screen is "3443". I want to display as "34".

    43

    17

    See attached extract

  • Someone advise me on how to record and remember the actual information from a group of combo boxes?

    I have a set of combo boxes save a devices status information. I would like to record and remind all selections. I know there are properties to access the selected items, but the research on, I do not know the technique to do so. I want to save/recall in XML format. I made an attempt, and he saved the combo box data, but not the selections. Thanks for any help.


Maybe you are looking for