Auto Populate one Field Based on Another Field

I am trying to populate the description field after the user has entered a value in the item number field and then tabs or otherwise exits the item number field. I'm sure this is in the documentation somewhere, but I'm in a big hurry.
By the way, this is only the second time I've looked at HTML-DB, so details would be appreciated.
Thanks a bunch!

Well, I've been all over all kinds of documentation, but the pieces are not coming together.
I have onchange="doSubmit('GETDESC');" in the HTML Form Element Attributes.
I have a couple of processes which fire, or don't, depending on the condition of Request (Request = Expression 1 vs. Request != Expression 1).
I know when a process fires because of messages I put in the Process Success Message.
My source is:
SELECT ITEM_DESCRIPTION INTO :P1_ITEM_DESCRIPTION
FROM PRT_HEADER
WHERE ITEM_NBR = :P1_ITEM_NBR;
When I change the value in P1_ITEM_NBR and tab out, the form comes back blank.
Any ideas?
Thanks,
Gregory

Similar Messages

  • Is there a way to auto populate one field based on a selection made in another field?

    We want to enter an account number and have the account name field auto populate.

    Yes there are many ways.
    Do you want to populate form a controlled source like a database?
    From data stored within the form?

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • Auto-populate form fields based on end user input?

    I'm currently attempting to create a new form that has a combo box "Locations" with various options.  What I'm looking to do is have another text field auto populate other fields related to that location (such as address, contact information) to save on time and reduce opportunity for end user errors in input.
    What are my options for accomplishing such a task?  Some form of binding fields with a MS database possibly?
    Thanks in advance for any advice and assistance on this matter!

    Paul,
    The form and (potential) database would be located on a shared drive on the company network in which those that would use the form already have access to.
    The pc's that user's would be using have Reader 9.
    The pc I'm using for developing this form has LC Designer 8, Acrobat Professional 8, and Reader 9.
    Ideally, I would "like" for the end user to have the ability to add new locations, addresses, etc ... in the event it is needed, although this would not be likely to come up.
    Based on the software I have on hand, and the need to not incur additional expenses, what would you suggest?
    Thanks again Paul!

  • Auto populate text fields with a trigger such as entering text into input fields in ADF

    Hello all,
    I am not able to auto populate text fields with a trigger such as entering text into input fields in ADF.
    I tried AdfFacesContext.getCurrentInstance().addPartialTarget(val); in the back end using setter method of input text field.
    its not working ..
    is there any way to achieve it
    Regards,
    Shakir

    Hi,
    Always mention your JDev version.
    The valueChangeListener would fire only when you set the autoSubmit property of the field to true. Can you elaborate your requirement? What do you mean by related data? Are you performing some sort of search?
    If you want to get the value you entered on the field, just set autoSubmit to true and get the new value from the valueChangeListener. If your requirement is something like as and when you type, do something, you need to check out this approach :https://blogs.oracle.com/groundside/entry/auto_reduce_search_sample
    -Arun

  • Auto populate date field

    I have a JavaScript that I use to auto populate date fields. However, I've discovered that it doesn't work when the form is opened on an iPhone or Android phone. Is there a way to auto-populate a date field without using JavaScript?

    What app on the iPad are you using.
    Different apps on mobile devices have varying degrees of JavaScript compatibility.

  • Backend order entry auto populate address fields

    hello Guys,
    we are getting orders by phone that i enter manually through the admin section of BC.
    the customers have accounts with with their contact details saved.
    until now i have been manually entering the delivery details on each order.
    is there any way to have this populate the fields on these orders when i am in the backend.  it seems a bit strange that i have to enter the address details for each order when i have the customers details stored in our data base.
    any help would be appreciated.
    thanks.

    I'm looking to Auto-populate address fields after selecting a name from a drop-down. iPad compatability not required. Most of my users will be using Acrobat Pro or Reader on a PC. I'm generating the files on Mac Abrobat X Pro.
    Is there an updated tutorial link someone knows about by chance? The above link no longer has a tutorial on it that I can see.
    Or, if anyone can direct me to a javascript or something that I can modify with my data list, that'd be great! I've been looking all over the place, and have been struggling to find something that looks like it would work the way I want it to. I need the data list to be self-contained inside the pdf doc, not sourced from an outside database.
    Thanks a bunch!

  • How to update one table based on another table ??

    Hello Friends:
    I am trying to run the following query in oracle but it won't run.
    UPDATE BOYS
    SET
    BOYS.AGE = GIRLS.AGE
    FROM GIRLS
    WHERE
    BOYS.FIRSTNAME = GIRLS.FIRSTNAME AND
    BOYS.LASTNAME = GIRLS.LASTNAME;
    This query runs fine in sql server but in oracle its saying can't find "SET". PLease tell me what is the correct syntax in oracle to update one table based on another table.
    thanks

    See if this helps.
    If you wrote an SQL statement:
    update boys set age = 10;
    Every row in the boys table will get updated with an age of 10. But if you wrote:
    update boys set age = 10
    where firstname = 'Joe';
    Then only the rows where the firstname is Joe would be updated with an age of 10.
    Now replace the 10 in the above statements with (select g.age from girls g where g.firstname = b.firstname and g.lastname = b.lastname) and replace where firstname = 'Joe' in the second statement with where exists (select null from girls g where g.firstname = b.firstname and g.lastname = b.lastname). The same concepts apply whether 10 is an actual value or a query and whether you have a where clause with the update statement to limit rows being updated.
    About the select null question regarding the outer where clause:
    Since the query is checking to see if the row in the girls table exists in the boys table what the column is in this select statement doesn't matter, this column isn't being used anywhere. In this case Todd chose to use null. He could have also used a column name from the table or a lot of times you'll see the literal value 1 used here.

  • How to auto populate a field based on drop down list unless specific item is selected

    Hi all,
    Apologies if I have posted this in the wrong area but I am new to Adobe LiveCycle, JavaScript and these forums.
    I am trying to build an Acrobat form using LiveCycle but am having trouble with the drop down lists.
    Inititaly I simply wanted to populate fields in one table based on the selection of a corresponding drop down list in another table.
    I used the following code and it worked fine:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The problem is that now I want the above code to work UNLESS one of the items in the dropdown list is specifically selected in which case I want the text box in the other table to display a message such as "Enter details in the field below".
    I have tried to create an If Else statement using the following code:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1"); 
    for (var i=0; i <= fFrom.length-1; i++) {
         if (fFrom.item(i).rawvalue = "Option 3"){
         fTo.item(i).rawValue = "Enter details in the field below";
         else {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The code now populates the field with "Enter the details in the field below" no matter what item I select from the dropdown list.
    Your help is greatly appreciated.
    Cheers,
    ozzy_q

    Follow Up:
    Ok so ive changed things up a bit and have had some more success.
    I have used a Switch statement in my For loop to perform different actions based on the item selected.
    The code looks like this:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*] .Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[* ].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         switch (fFrom.item(i).rawValue)
         case "Option 3":
         fTo.item(i).rawValue = "Enter the details in the field below";
         break;
         default:
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
         break;
    This code solves my problem but has thrown up a new issue:
    When i select Option 1 or 2 from the dropdown list  the change in the text field is instantaneous, however if I select Option 3 it wont appear in the text field until I either select Option 3 a second time or select another item. Its as if the text field is a selction behind what I have enterd in the dropdown list.
    Any thoughts?

  • Auto populate text field base on anothe r text field input

    ive created a medical form that the end user enters codes for medical reasons and a description for that code. the description are very long and tedious. is there a way to have the user enter the code in one field  and have it auto populate another field with the correct description?
    I was able to do this with a  combo box but not with a standard text box. please note, i  have never learned javascript and have been ""duct taping" peices of code to make things work  up until now . appreciate the help

    The advantage of the combo box is the automatic validation of the input as the selection is made.
    You can use control statements like the "if" or "switch" statement or perform an array lookup. This action can be performed in the on blur action of the input filed or in the calculation script for the target field.

  • How to populate one internal table from another using field symbols

    Hi Gurus,
      I have a problem. I have to populate one internal table (sructure t_otput) from another internal table (sructure t_from) using field symbol.
    Structure for from table.
    types: begin of t_from,
             year(4) type c,
             ww(2) type c,
             site type marc-werks,
             demand type i,
           end of t_from.
    Structure for output table.
    types: begin of t_display,
             title(30),
             WW1(10),
             WW2(10),
             WW3(10),
           end of t_display.
    The from table looks like this:
    Year | WW | Site | Demand
    2005 | 1  | OR1  | 12.00
    2005 | 2  | OR1  | 13.00
    2005 | 3  | OR1  | 14.00
    The display table which has to be populated should look like this:
    Title  | WW1   | WW2   | WW3
    OR1    |       |       |
    Demand | 12.00 | 13.00 | 14.00
    How to populate display table using field symbol?
    Please give code snippets
    Thanks,
    Gopal

    Gopal,
    Here is the code, however I am not vary clear about the ORG1 and Demand display that you have shown in the display. I am sure with this code it should not be a big deal to tweak in whatever manner you want.
    TABLES : marc.
    TYPES: BEGIN OF type_display,
    title(30),
    ww1(10),
    ww2(10),
    ww3(10),
    END OF type_display.
    TYPES: BEGIN OF type_from,
    year(4) TYPE c,
    ww(2) TYPE c,
    site TYPE marc-werks,
    demand TYPE i,
    END OF type_from.
    data : t_from type table of type_from,
           t_display type table of type_display.
    field-symbols : <fs_from> type type_from,
                    <fs_display> type type_display.
    data : wa_from type type_From,
           wa_display type type_display.
    wa_from-year = '2005'.
    wa_from-ww   = '1'.
    wa_from-site = 'OR1'.
    wa_from-demand = '12.00'.
    insert wa_from  into table t_from.
    wa_from-year = '2005'.
    wa_from-ww   = '2'.
    wa_from-site = 'OR1'.
    wa_from-demand = '13.00'.
    insert wa_from  into table t_from.
    wa_from-year = '2005'.
    wa_from-ww   = '3'.
    wa_from-site = 'OR1'.
    wa_from-demand = '14.00'.
    insert wa_from  into table t_from.
    data : variable(3) type c.
    field-symbols : <fs_any> type any.
    break-point.
    Loop at t_from assigning <fs_from>.
    variable = 'WW'.
    wa_display-title = <fs_from>-site.
    concatenate variable <fs_from>-ww into variable.
    assign component variable of structure wa_display to <fs_any>.
    <fs_any> = <fs_from>-demand.
    endloop.
    append wa_display to t_display.
    clear wa_display.
    loop at t_display assigning <Fs_display>.
      write :/ <fs_display>.
    endloop.
    Note : Please award points if this helps you.
    Regards,
    Ravi

  • How to auto-populate form fields between documents?

    I'd like to create an interactive form where the user inputs data into different fields and then the data gets auto-populated into other fields in forms linked to the original form. Is this possible with Acrobat XI? If not, then which Adobe product is best suited for this? If it's possible, how difficult is this to do? I don't need exact "how to" tips at this point. I am not a developer and I don't have any experience with Action Script. I'm just researching what products I can use, as a non-techie, to do the job. Thanks.

    Thanks for your reply. I'm having a hard time understanding the functionality on the end-users's side with the different Adobe forms products. I did a little more reading up on this, but it's still not 100% clear. Perhaps you can help clarify.
    Scenario 1: The user does NOT have a copy of Acrobat XI on their end, and  I do NOT have a subscriptiont to FormsCentral, and I do NOT enable import/export features in the form using Adobe LiveCycle Reader Extensions. In this scenario, the user can fill out my form, but they can't save a copy of the completed form on their local drive. I, however, get a copy of the completed form where I can then extract and analyze the data.
    Scenario 2: The user does NOT have a copy of Acrobat XI on their end, but I have have a subscriptiont to FormsCentral. The user can complete the form and save it on their local drive, but I can't have data auto-populate from one to another. (Note: I went to the FormsCentral website and it says "Allow respondents to download the PDF form, print out, save, EDIT and submit later." I interperet that as meaning they can add text to a fillable form and save it on their end.)
    Scenario 3: The user does NOT have a copy of Acrobat XI on their end, but I have enabled the form with LiveCycle Reader Extensions so that I can have data auto-populate from one form to another. However, I have to pay for an Extension license fee. I managed to find the pricing, and it's too expensive for my needs right now. I'm looking to share the forms with students, so this is not an option.
    Scenario 4: The use HAS Acrobat XI. I can get data to auto-populate from one form to another and the user can complete and save on their local drive. This scenarios is not an option for me / Can't get students or schools to pay for a full license of Acrobat XI is not an option at this point.
    Is my understanding correct? If so, I feel like I've hit a dead-end. The only cost-effective solution is to have a simple fillable form without the ability to auto-populate data between forms. Sigh.
    Thanks.

  • Auto populate for fields in ZTable

    Hi
    I created a Z Table with 10 Fields,Out of those 2 fields are timestamp and Created by.
    Timestamp and Created by are made Output only fields in Table Maintenance Generator
    SE11> ZTable>Table Maintenance Generator>Environment>Modifications-->Events
    Type -5  concatenate sy-datum sy-uzeit into ZTable-Timestamp.
    With which when user performs a manual posting in the table and save a record in SM30 the Timestamp is populated automatically.
    Similar to these how can i Auto Populate the Created By with the user id (logon id) of the user who made the posting.
    I tried to create a new event of type-5   - System is not allowing me to create a event another event of same time
    How can i enhance the exisisting event so that i can get Auto Populate of Created By
    Thanks in advance

    Hi friend,
    Put your code which populate user name inside form of event 5 (maybe below your existence code).
    regards,

  • How do you auto-populate a field?

    Hello.
    If I present the user with a LOV's on an 'Insert Form', how do I auto-poulate a value in the same form based on what the user has just selected?
    e.g.
    User selects 'Employee Number' from a LOV, I then want to auto-populate the 'Employee Name' underneath.
    I thought a simple sql query would get me the EMP_FULL_NAME FROM EMPLOYEES where EMPNO = (whatever EMPNO user has just selected).
    TIA.

    Hi Tia,
    You are right you should just be able to use a query as the source of your page item for name. I will base my description below on page 1 and using APEX 4.
    First of all you will need to set your :P1_USER_ID select list to submit the page so the value is set in session state, if you navigate to the settings section and then set Page Action when Value Changed to submit page.
    You will then need to have a query as the source of :P1_NAME and a query something like
      SELECT
        name
      FROM
        users
      WHERE
        user_id = :P1_USER_ID;One thing to not you will need to make sure you on submit processes are conditional based on a button else they will run when the user_id select lists is changed.
    An alternative method to submitting the page would be to use a dynamic action providing your using APEX 4. The dynamic action could be fired when the value of :P1_USER_ID is changed and then update the value :P1_NAME dynamically.
    Hope this helps
    Paul

  • LiveCycle ES2 - Auto Populate Date field when signed

    Good afternoon,
    I've got a signature field called "sgnPOC" and a date field called "sgnPOCDate" I'd like to have the date field filled in automatically when the sgnPOC is digitally signed.
    I added the following to the postSign* event to sgnPOC.
    FORM.Main.sgnPOCDate.rawValue = util.printd("mm/dd/yyyy", new Date());
    and different variations including setting the date to yyyymmdd and like. It just won't auto populate. It passes the script check in the script editor.
    any ideas?
    Thank you.

    Thank you,
    I tried the following - to no success.
    FORM.Main.sgnPOC::postSign - (JavaScript, client)
    var myDate=date()
    FORM.Main.sgnPOCDate.rawValue = Num2Date(myDate, "YYYY-MM-DD")
    I also tried this
    FORM.Main.sgnPOC::postSign - (JavaScript, client)
    var myDate=date()
    $.rawValue = Num2Date(myDate, "YYYY-MM-DD")
    Which also did not work, but wouldn't that need to know where to put the date?

Maybe you are looking for