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

Similar Messages

  • How do you auto populate a date in a different text field after someone digitally signs the PDF form?

    I am trying to auto populate a date in a text box on the upper right hand corner of my document after someone digitally signs it. Is this possible? How do you do this?

    Go to the Properties of the Digital Signature field and under the Signed tab enter this JS code, under the last option:
    this.getField("SignDate").value = util.printd("mm/dd/yyyy", new Date());
    this.getField("SignDate").defaultValue =this.getField("SignDate").valueAsString;
    Of course, you can adjust the field name and the date format used in the script above.

  • How do you auto-populate a text field based on entries in other text fields?

    I would like to be able to have a text field that populates as "Complete" or "Incomplete" based on whether all the mandatory text fields have been filled out or not.
    For example, if the "First Name," "Last Name," and "City" text fields are not filled out, the "completion status" text field will show "Incomplete" and once they are filled out, the "completion status" text field will turn into "Complete."
    How would I do this using javascript? I've searched the web for a tutorial, but most of the results seem to be dropdown-centric.
    Please point me in the right direction!

    Try the script below. I put this on the calculate event for Field1
    if(FirstName.rawValue == null || LastName.rawValue == null || City.rawValue == null){
    Field1.rawValue = "Incomplete"
    else
    Field1.rawValue = "Complete"

  • How do you auto populate a dynpro field when hit key while in other fields?

    This is a dialog programming question for a custom dialog program (it is NOT an SAP program).
    I have a dialog program that neds to be changed to accomodate the following.
    i have searched SDN and can not find anything to resolve this issue.
    I have a screen with multiple lines, scrolling, etc.
    The first field in a line is a required entry.
    There are two date fields that need to be automatrically populated when a value is entered in the first field.
    In other words - when the user enters the first field value and then tabs to next field (or they may press enter, etc.) i need to populate the date fields on the same line and display them back to the user immdeately.
    I can not get this to work - any help most appreciated.
    Thanks.
    Scott

    Unfortunately, there's no 'tab-out' event in ABAP standard dynpros - you've got to trigger a PAI event to make that happen (such as hitting 'Enter').

  • 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 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,

  • 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 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 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.

  • 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.

  • Can you auto populate IPTC core values?

    Hi
    Every time i want to populate the iptc core values in bridge i have to do them manually. Quite a few are always the same, ie, email, creator etc. I usually cut and paste from another image which is time consuming
    Can i somehow auto populate some fields with the same text everytime?
    thanks
    simon

    If you select multiple files at once you can add metadata to them in one go by filling just the wanted metadata in the wanted fields and after apply all selected files are saved with the filled metadata.
    But you can also create a metadata template (metadata panel top right tiny menu icon, create metadata template) and fill in all usual data like name, address, copyright info etc.
    Either select the files you want to change and from same menu choose append metadata (you can create several templates and choose from them using this menu) or use Photodownloader and select the copyright template to be written to the files upon import.
    Many ways to use this powerful function in Bridge

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • How do you auto tone a group of photos. I selected them all and tried to auto tone but it keeps doing only one

    How do you auto tone a group of photos. I tried command a to select all and then auto tone but it only did one Photo. I troes several times and yes all photos were selected

    In Develop you can highlight a group of thumbnails in the filmstrip, then right-click and choose Develop Settings -> Auto Tone
    In Library you can highlight a group of thumbnails in the Grid and click the Auto Tone button in the Quick Develop area.
    What you can’t do is click the Auto button in Develop and have it do more than one photo—this is by design, except, maybe if you have Auto Sync enabled.

  • How do you auto reconnect a live video stream broadcast in flash action script 3?

    how do you auto reconnect a live video stream broadcast in flash action script 3?
    so i don't have to ask people to refresh the page if the connection drops
    i copy pasted the live video stream broadcast files and script from here;
    http://www.adobe.com/devnet/adobe-media-server/articles/beginner_live_fms3.html
    http://www.adobe.com/content/dotcom/en/devnet/adobe-media-
    server/articles/beginner_live_fms3/_jcr_content/articlePrerequistes/multiplefiles
    /node_1278314297096/file.res/beginner_live_fms3.zip
    i don't know what i'm doing

    Why don't you use several layers with appropriate alpha properties, and move these layers according to the mouse events?

  • 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!

Maybe you are looking for

  • Print out every delivery

    Dear All. Till this day the duty-form for a company were performed through a special Form Program, it is performed via processing routines. The first Form Routine's name is entry. Form was printed-out for each Transport up to now. Current Requirement

  • I'm Scared! Syncing Applications, HELP!

    I have never synced my apps on my 3GS, so when I backed it up and I restored it to my new iPhone 4, I lost all my apps. So for the last 4 hours I have gone through itunes and reinstalled my apps to the new iPhone. I want to sync my new phone but when

  • Epson prints too dark from LR on color managed MacBook Pro?

    Hi all, I have a newish MacBook Pro, calibrated with Spyder2, and printing to an Epson 2200. The prints are too dark, and don't really come close to matching the screen in LR. I've brought the images into PS2 for soft proofing, but the prints are sti

  • 1D10T Question. Invalid Drive X:

    I was install the JRE on a box a few moments ago, and it refused to install, with "Invalid Drive X:" (Win2K, latest patches). Mapped X to \\localhost\C$, and all was fine. Anyone know why? Ta, Mike

  • Cursor not fetching the latest value in the loop.

    Hi! I'm facing a peculear problem. I've a procedure which will check the total number of records in a loop. It will fetch that value. If that value mathced with certain condition then the outer loop execution need to stop. Here is my script - <<Outer