Populating a text field in a form based on selection from a list field?

Hello,
I'm using Acrobat 9 on a mac.
In the list field users choose their hospital name. I then want the address associated with this hospital to populate a text field. Where do I enter the hospital addresses and the "script" (if hospital X then this address)? I've copied this list field and am using it in multiple places on the form by utilizing "global binding" and this is working well.
Also, can the choices in a list field "drop down" or is the only option available a "click through?"
Thanks in advance for your help!!

hi, i've seen this problem before but can't remember what the solution was...
but just by searching on this forum resulted in this link
Re: Copy and Paste
hope it helps

Similar Messages

  • Polulate textfield(s) from a MS SQL Database based on selection from DropDown List

    I am new to LiveCycle Designer. I am trying to create a Master Bill of Lading form. I want the user to be able to enter a Store Number from a in a text field and, based on what they enter I want to populate the address information from a database on my SQL Server.
    When I bind the address fields from the database, I only see the first record in the database.
    I'm not sure where to go from here...
    Thanks in advance,
    Jeremy

    That seemed to fix my error and returned the value to my DDL.
    I have modified the code so it looks at the clone of my dataConnection (dcStoreData)
    CODE:
    btnClear.MainPage.sStNo::change - (JavaScript, client)
    var inStrNbr = xfa.event.newText;
    if (inStrNbr == ""){
    app.alert("You must enter a valid name - try again!") } var nIndex = 0;
    while(xfa.sourceSet.nodes.item(nIndex).name != "dcStoreData")
    nIndex++;
    tfStoreID.rawValue = inStrNbr;
    var oDB = xfa.sourceSet.nodes.item(nIndex).clone(1);
    // the node pertaining to the data connection specified
    //app.alert(oDB.saveXML("pretty"));
    //set up sql call to DB to get specifics about employee
    oDB.nodes.item(1).query.setAttribute("text", "commandType");
    oDB.nodes.item(1).query.select.nodes.item(0).value = "Select * from tblStoreMast_LastVersion where StorNbr = '" + inStrNbr + "'";
    //app.alert(oDB.nodes.item(1).saveXML("pretty"));
    //now connect to DB and get a record
    oDB.open()
    oDB.close();
    it runs with no error and I am seeing the value it has given my DDL.rawValue
    Now I get the "error:"
    GeneralError: Operation failed.
    XFAObject.open:16:XFA:btnClear[0]:MainPage[0]:sStNo[0]:change
    ado2xfa operation failed.  Item cannot be found in the collection corresponding to the requested name or ordinal.
    My Store Number is stored as an int in the database.
    Do I have to somehow cast it as a character?
    Sorry for the headache!
    Jeremy

  • Change the source for a media player based on selection from a list.

    All of this is referring to my public facing website in Office 365.
    I put the following code in a content editor web part:
    <audio controls>
      <source src="http://someserver/somefile.mp3" type="audio/mpeg">
    </audio>
    This works just fine. 
    What I want to do, is display a table below this which is a list of mp3's. when the user clicks on one of them the audio plays in the <audio controls>. 
    In other words, I want to change the source of the above player when I click on a link elsewhere in the page.
    Thank you
    Joe Fager

    What you'll need to do is have a javascript onclick/onchange event in the dropdown that runs a set of code that will reset the audio control with the new source. That can be done with jQuery.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • Syntax for sum in Smart Form based on Selection criteria in Program.

    Hi,
    We have created smart form for printing confirmation entries in desired format. We have given some selection criteria in the program. Now, we want to do the sum of certain fields in the smart form based on selection criteria given in program and selection screen.
    But we are getting wrong sum in the smart form than expected.
    When we debug the program during run time, we are getting correct records as per our expectations. But result of sum in the out put is not as per given selection criteria.
    Do we need to establish link between "select option" and "Smart form"? How can we use internal table created for select option in the smart form?
    Thanks & regards
    Vijay

    Hi,
    There will be no option to sum the values in smartforms, You just have to sum and append the data to internal table and display the internal table data in the form.
    Regards,
    Satish

  • Populating a text field depending on what is selected in list item field

    I have A form which contains a ROOM_REF field which is a list item, and a ROOM_DESC field which is a text item. (among other things).
    When the user selects from the ROOM_REF field (which is populated by a record group on startup),
    I want it to automatically populate the ROOM_DESC field with the coresponding (read only) data.
    Which kind of trigger do I need to use and with what code?
    Something like:
    SELECT ROOM_DESC FROM ROOM WHERE ROOM_REF = :SESSION.ROOM_REF;
    Thanks

    Did you try this code in WHEN-LIST-CHANGE trigger of list item.
    SELECT ROOM_DESC INTO :ROOM_DESC FROM ROOM WHERE ROOM_REF = :SESSION.ROOM_REF;-Ammad

  • Populating all the columns in a form based on LOV

    Hi people,
    I got a forms which has around 20 fields ...i created this using the data block wizard....
    when i compile and run the form... i get the form screen... and when i click the default execute_query button i get the records the way i want ....
    but the problem is there are around 11000 records ....so for that i created an LOV based on the ID and the description
    Now
    I want to populate my blocks based on the ID that i select from LOV ....
    can 1 help me accompalish this task...
    one thing that i have in mind is using SET_BLOCK_PROPERTY
    but when i use it i am not able to execute to perfectly...

    Hello,
    If you want to populate the block by selecting value from LOV in the same block. Then make the life simple.
    1. Open your form in ENTER_QUERY mode.
    2. Let the user choose value from LOV.
    3. Then just simple perform exequte query.
    It will search upon the selection..
    Or there is new block for search cirteria then you will have to use the SET_BLOCK_PROPERTY as you mentioned like...
    For Numeric...
    SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE,'COLUMN_NAME = '||:SEARCH_BLOCK.FIELD_NAME);
    For Alphanumeric
    SET_BLOCK_PROPERTY('BLOCK_NAME',DEFAULT_WHERE,'COLUMN_NAME = '''||:SEARCH_BLOCK.FIELD_NAME||'''');Use the above code on your required trigger where you need to populate the records based on selection.
    -Ammad

  • Populating Multirecord text fields from Tlists value's combinations

    I have a UI wherein there are two T lists, one on the Left and other on the Right. The left one contains
    From values and the Right one contains To values. There's one Button which when Pressed should populate
    a Data Block which has multi record text fields just below the button with all the possible combinations of
    the T lists elements. The Text fields have the values From, To, Time, Unit. When populated From and Two will
    get the values from the combinations and the user will enter the values in other fields i.e. Time and Unit,
    Then the user can save the Records.
    e.g. If the Left T list contains Red, Blue and the Right T List contains Green, Black. Then on pressing
    the button below the T lists, the text fields From and Two of a data block displayed in the same window
    should get populated with all the possible combinations as:
    From || To || Unit || Time
    Red Green
    Red Black
    Blue Green
    Blue Black
    Now the user can enter the values for Unit as well as Time and when he does save the Records should be inserted
    for the Data Blocks DML Source that's some table.
    What I'm trying is:
    On pressing the Button i'm writing code that will have Two PL/SQL Tables(Index by binary_integer). One will have
    all the values of the left T List and the other with all the values of right T List.
    I do it as in the WHEN BUTTON PRESSED as:
    DECLARE
    TYPE varchar_table IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
    from varchar_table;
    to varchar_table;
    v_count1 NUMBER;
    v_count2 NUMBER;
    v_count3 NUMBER;
    v_count4 NUMBER;
    BEGIN
    v_count1 := Get_List_Element_Count('CONTROL.FROM_TYPE');
         FOR i IN 1..v_count1 LOOP
              from(i) := Get_List_Element_Value('CONTROL.FROM_TYPE', i);
         END LOOP;
    v_count2 := Get_List_Element_Count('CONTROL.TO_TYPE');
         FOR i IN 1..v_count2 LOOP
              to(i) := Get_List_Element_Value('CONTROL.TO_TYPE', i);
         END LOOP;
    END;
    Now how will I populate the text fields with the values in the tables that i got with the piece of code above.
    Any help would be appreciated. Any other method other than the one i'm trying is also welcome. Please note that
    i'm not using any table to store the elements in the T Lists. The lists get values at runtime by
    user's selection.
    Thanks,
    Abhishek.

    Try and stay civil in your postings. The solotion should be to simply issue a GO_BLOCK, followed by a CREATE_RECORD followed by setting the approriate values :block.value = <value from list>

  • Having issues with populating a Text Field with data from 2 other fields

    I have 3 fields Tools_1a_pri, Tools_1a_pri_other, Tools_1a_pri_txt.
    Tools_1a_pri is a drop down combo with a predefined list. One of the options is "Other".  When "Other" is selected, the text field Tools_1a_pri_other becomes visible for users to enter the name of the other tool.
    The Tools_1a_pri_txt is a text field with a calculation that shows either text stating that no tool has been selected or the Tools_1a_pri & or Tools_1a_pri_other.
    When I select one of the predefined tools, everything works.  When I select other, it appears that nothing has changed.  It requires that I click on another field before it populates.  This is confusing to the user.
    Tools_1a_pri   Validate code
    this.getField("Tools_1a_pri_Other").display = event.value=="Other" ? display.visible : display.hidden;
    Tools_1a_pri_txt  Calculation code
    //if nothing is selected, do the following
    if (getField("Tools_1a_pri").value.length < 2) {
    event.target.textColor = color.red
    event.value = "No primary tool identified";
    }else if (getField("Tools_1a_pri").value != "Other") {
    //otherwise do this if other is selected
    event.target.textColor = color.black
    event.value = getField("Tools_1a_pri").value;
    }else if (getField("Tools_1a_pri").value = "Other") {
    //otherwise do this if other is not selected
    event.target.textColor = color.black
    event.value = getField("Tools_1a_pri").value + " - " + getField("Tools_1a_pri_Other").value;

    You made the classic mistake of using the assignment operator in an if-statement instead of the comparison operator. Change this line:
    } else if (getField("Tools_1a_pri").value = "Other") {
    To this:
    } else if (getField("Tools_1a_pri").value == "Other") {

  • How Do I:  Fill a read-only field based on selections from 2 DDlists?

    Follow-up from issue:  
    http://forums.adobe.com/message/2417876#2417876
    I have 2 drop-down lists...  "Department" and "SubDepartment"
    The selection in DDlist "Department" spawns a unique list in DDlist "SubDepartment"
    I select the proper items from both DDlists.
    When I do this, I want read-only text field "NameOnIDBadge" to be populated with a pre-defined entry.
    Example:
    In "Department" DDlist, select item "Finance & Administration"
    In "SubDepartment" DDlist, select item "Food Service" from the list that appears
    THEN:
    In read-only text field "NameOnIDBadge" the following predefined read-only text appears:  "Contract Food Serv."
    (Thanks to Paul, I already know how to make the selection in DDlist "Department"  affect the selection list in DDlist "SubDepartment"
    but I don't know how to make the selection of both DDlists create a new pre-defined entry in a text field.)
    I have attached a mockup of the file I am working with...

    I tried that but a few things went wrong.
    1. After I select "Food Service" in the second "SubDepartment" DDlist, a Javascript error message pops up (see attached), and I have to click it to make it go away.  Then the text "Contract Food Serv" appears in the text box.
    2. If I select a different value in the Department DDlist, the rawtext still remains in place... it should clear out.
    3. The raw text seems to be based on the selection of the SubDepartment DDlist only.  However, I need specific raw text to be generated based on the combination of BOTH DDlists.   (It could happen that a totally different Department DDlist could have the same item in its corresponding SubDepartment DDlist.  In that case, the rawtext would be completely different.)
    Correct example:
    Department DDlist = Finance & Administration
    SubDepartment DDlist = Food Service
    NameOnIDBadge = Contract Food Serv  <-- CORRECT
    Incorrect example:
    Department DDlist = Clinical Services
    SubDepartment DDlist = Food Service
    NameOnIDBadge = Contract Food Serv   <--  INCORRECT   (it might be something else)

  • Populate field based on selection from another field?

    I'm using a Data Connection with a SQL query that returns two fields (StNameFull and ADDRKEY). I have a drop-down list called "Address" with the list items dynamically bound to StNameFull, so the user can select the address.
    What I'm trying to do is populate the second field "Key" with the corresponding record, based on the selection made from the drop-down list.
    Is it possible to script this so that when the Address is selected the Key will automatically fill in with the key that matches the address selcted?
    I currently have "Key" as a text field bound to ADDRKEY, but not sure how to have it check what was selected in "Address"
    Thanks so much,
    - Kevin

    Yes it is possible but you will have to write some script to do it. You wil also have to ge the DataConenction to execute a SQL statement. There is a good blog on this topic at this location:
    http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
    Paul

  • Link an image field to a value selected from a list

    Hello!
    I'm newbie to Dreamweaver - PHP and I have a problem. I have
    made a list that displays the names of all the images of my
    database. Now, I want every time the user selects a value from the
    list the corresponding image appears on the same page. How can I do
    this?
    Please help me!!!

    Hi Stefan,<br /><br />Thanks for responding to my last mail. I am talking about the XFA(xml form architecture). Actuallly i am working on Picture form field in PDF which Adobe has newly introduced. In this type of form field , user can add an image. But i am not able to differentiate between the "Picture form field" and "push button". The only thing i have found that the picture form field entry exist in dataset but not the Push button.<br /><br />29 0 obj<br /><<<br />/Length 13533<br />>><br />stream<br /><xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><xfa:data><form1><IMAGE href="" xfa:contentType="image/jpg"></IMAGE></form1></xfa:data></xfa:datasets><br />endstream<br />endobj<br /><br />In the above case the "Image" is a picture form field.<br /><br />Another difference i found between "push Button" and "Picture Form Field" is the MK dictionary as below.<br /><br />Pushbutton<br />-----------<br />/MK <<<br />/BG [ 0.831375 0.815689 0.784317 ]<br />/CA (Print Form)<br />/BC [ 0 0 0 ]<br />>><br /><br />Picture form Field<br />-------------------<br />/MK <<<br />/TP 1<br />/I 17 0 R<br />>><br /><br />But i want to find the exact difference. May be some bit in Form Field Flag(ff) signify the picture form field. It will be very helpful to me if you could tell me the exact difference.<br /><br />Kind Regards,<br />Shekhar Kumar Keshri

  • Submit a form based on responses from a field

    I was wondering if this can be done, I would like to submit a from but when it is submitted I want it to go to a particular email address based on a result of another field.
    Example, If I have 4 geographic regions in the US (eastern, central, Mountain, and pacific) I would like the form sent to a generic region email based on the region the customer picks from an above field.
    I have no problem using Forms Central if need be but I do not know if Acrobat can do this.  I understand Acrobat is not really a Database but could use some guidance
    Has anyone done this and can it even be done? 
    Thanks in Advance

    Yes, it can be done. See this tutorial:
    http://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

  • Populating multiple text fields from a database table...

    I have a database table with several fields e.g. drawing_no, title, date_entered etc..I have a form that has the same fields. I want to be able to input a value into drawing_no field, and have it retrieve all the other values from the database - if they exist, or return blanks/nulls if it does not exit. I know how to do this for a single field, but not for retrieving multiple fields

    Hi ,
    You can create a before header page process and fetch all the fields from database, or you can take a look at in-built process Automated Row Fetch.
    For e.g. lets say u have field1, field2, field3, field4 and field5 based on col1, col2, col3, col4, col5 from table tab1
    Now create a page process of type PL-SQL and give a meaningful name to the process and accept the default as on Load Before header. In the "Enter PL/SQL Page Process" block enter a code similar to this one
    DECLARE
    BEGIN
    IF :drawing_no IS NOT NULL THEN
      SELECT col1, col2, col3, col4, col5 INTO :field1, :field2, :field3, :field4, :field5
      FROM tab1 WHERE drawing_no = :drawing_no ;
    END IF;
    EXCEPTION WHEN NO_DATA_FOUND THEN
               NULL;
    END;The above block will fetch the records into input fields every time u refresh the page.
    Hope this helps.
    Thanks,
    Manish

  • HTMLDB_ITEM.POPUP_FROM_QUERY Populating Previous Text Field

    I have manually created an updateable report from an SQL Query in which I manually index each editable field. I also include some hidden values which I also attempt to control the index values. The rows to be displayed on this page are the result of an adhoc search page (P30). Everything works fine except when I have more than one row returned and try to edit any row other than the first. When I do, the previous row's corresponding field is affected and the last row popup fields can never be changed. My listboxes work fine and appear to be indexed correctly. Am I missing something? Thanks in-advance.
    A condensed version of my SQL:
    select
    NULL "CHECK$01", -- index 01? -- Checkbox for multiple updates is first index
    "TRANSACTION_NUMBER",
    "H_RID", -- index 02?
    "DUTY", -- index 03?
    "IC", -- index 04?
    "IS_NEW", -- index 05?
    "SUBMIT" -- index 06?
    from(
    select
    '0' AS "TRANSACTION_NUMBER", -- to be replaced with dynamic value
    HTMLDB_ITEM.HIDDEN(2,PE||FO) AS "H_RID", -- could hiddens be the problem?
    HTMLDB_ITEM.SELECT_LIST_FROM_QUERY_XL(3,DUTY,'SELECT DUTY||'' - ''||NVL(TITLE,''None Selected'') a, DUTY b FROM PDM.DUTY ORDER BY b') AS "DUTY",
    HTMLDB_ITEM.POPUP_FROM_QUERY(4,IC,'SELECT IC||'' - ''||NVL(TITLE,''None Selected'') a, IC b FROM PDM.INFRA_STRUCTURE ORDER BY b') AS "IC",
    HTMLDB_ITEM.SELECT_LIST(5,'N','Yes;Y,No;N') AS "IS_NEW",
    HTMLDB_ITEM.SELECT_LIST(6,'N','Yes;Y,No;N') AS "SUBMIT",
    HTMLDB_ITEM.MD5_CHECKSUM(duty,ic)
    from fd.pe
    /* Where condition to address previous search page values to determine number of rows to return for editing */
    where (:P30_DUTY = DUTY OR :P30_DUTY IS NULL)

    Scott,
    I had indicated the example was throwing errors associated with the HTMLDB_ITEM.POPUP_FROM_QUERY items. Although this is not the same error I am encountering in version 2.0 it does indicate that either there is an issue with my SQL or a bug with version 3. The SQL used to generate the reports is almost identical to the query I am running on my development site. The table and column names are different and I have provided a "Reader's Digest" version of my actual SQL.
    I can eliminate the LOV errors on this site by replacing the POPUPs with LISTs, but that defeats the point. For efficiency of time, I need to implement POPUPs because the data behind them can potentially result in hundreds of records. Compound this with the number of fields per record which might also employ POPUPs and I could very quickly exceed memory limitations of HTMLDB.
    Again, any assistance would be appreciated. Thanks.
    Ed
    PS. I have edited my SQL for the POPUPs. Apparently, the init LOV errors associated with them were generated by a simple concatenation of data fields within the inner select. I originally had:
    HTMLDB_ITEM.POPUP_FROM_QUERY(4,IC,'SELECT IC||'' - ''||NVL(TITLE,''No Title Available'') as a, IC as b FROM BORG_CUBE.IC ORDER BY b') AS "IC",
    by changing the above to read:
    HTMLDB_ITEM.POPUP_FROM_QUERY(4,IC,'SELECT IC as a, IC as b FROM BORG_CUBE.IC ORDER BY b') AS "IC",
    the init LOV errors went away. Now, there are no errors and no ability to replicate my error for you. Upgrading is not an option at this point, so I will begin recoding. :-(
    Message was edited by: MovingTarget
    MovingTarget

  • Automatically fill input fields based on selection from dynamic drop down

    Hi All,
    I tried to search before posting, but i cannot find appropriate thread (maybe wrong keyword).
    My scenario:
    1. In my offline interactive form, I have:
        a.  Material Number --> drop down field with "Allow Custom Text Entry" ticked
        b.  1 execution button to call web service
        c.  Material Group - Input Field (Read Only)
    2. User will enter material number with wild card character (eg: ABC*).
        User will then click the execution button.
        Web Service in result will return all materials that match the entered material number.
        Dynamic binding will do the magic to generate the drop down list.
    3. Beside material number, web service will also return material description and material group.
        Below is the illustration:
         Material        Description       Material Group
         ABC              Material ABC               GRP01
         ABCDE        Material ABCDE          GRP02
    --- so far so good ---
    My requirement:
    Every time user select material from the drop down list, i want to auto-populate field "Material Group" (which value is also returned by web service).
    I know i need to put the script on event change of the drop down field.
    But i don't know how to read internal table returned by web service.
    Hope someone can enlighten me.
    Thanks in Advance !!!

    Solved after reading:
    1. /people/juergen.hauser2/blog/2007/09/03/accessing-data-nodes-in-sap-interactive-forms
    2. Chapter 7 of Live Cycle Designer Scripting Basics
    (http://help.adobe.com/en_US/livecycle/9.0/LiveCycle_Designer_Scripting_Basics.pdf)
    Thanks.

Maybe you are looking for

  • Can a SQL view see data from an ODBC connection?

    Hi. I currently have an application that pulls data from a custom SQL view in my SQL database. This custom application can not be changed, so it expects to see the data exactly as presented by my custom SQL view. This works fine when the data resides

  • Optmization of calculation script Please help urgent

    hi all, I know three ways to tackle the block creation issue. 1. Set CreateBlockon equation. 2. try some data copy. 3. calcualte a member via sparse dimension. I have a calc as shown below: Set CACHE HIGH; Set UPDATECALC OFF; SET AGGMISSG ON; FIX( @R

  • How to install apps on sd card in Windows 8.1

    Why is it not possible to install apps from the Windows Store on to sd cards in the Windows 8.1 OS???? This is absolutely frustrating because you guys obviously blocked the functionality to change it since Windows 8, and since I've updated my tablet

  • How to get BT sport on the television. You view or...

    I'm look at ordering phone, TV and infinity. The main attraction is that BT sport is free. I want to watch BT sport on the tele, not online using an app or otherwise. So this is where I get confused. If i enter my postcode and house number im told sp

  • Possible to reduce the amount of white space in thumbnail view?

    Hi, after following these directions to generate large thumbnail views, there is still a lot of white space surrounding the thumbnails - I'm wondering if this could be significantly diminished, to allow more images, closer together. thanks 1. Open a