Acrobat XI - Populating value of a field based on another field

pdf built in Acrobat XI
New to this and I have tried every possible combination I can think of! For simplicty purposes, I have two text fields, Text1 and Text2. I want Text2 to populate based on the value entered into Text1. Have an Action event (Mouse Up) on Text1 as follows:
var OneT = this.getField("Text1");
var TwoT = this.getField("Text2");
TwoT.value=OneT.value;

[Moved to Acrobat JavaScript forum]
If you name each field the same, the values will automatically be the same. But if you want to be able to change the value of Text2 after it is autopopulated, you should use a different script and a different event. The following custom Validate script for Text1 will set the value of Text2 when the value of Text1 changes:
//Custom Validate script for Text1
getField("Text2").value = event.value;
If you only want to set the value of Text2 when it is blank, the code could be:
// Custom Validate script for Text1
// Get a reference to Text2
var f = getField("Text2");
// Only set it value if it is currently blank
if (!f.valueAsString) {
    f.value = event.value;
This allows the user to change the value of Text2 without it getting reset when Text1 is changed.

Similar Messages

  • Change field value in a table, based on another field value in the same row (for each added row)

    Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
    I am using this code :
    <HTML>
    <HEAD>
    <SCRIPT>
    function addRow(tableID) {
    var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    var row = table.insertRow(rowCount);
    var colCount = table.rows[0].cells.length;
    for(var i=0; i<colCount; i++ ) {
    var newcell = row.insertCell(i);
    newcell.innerHTML = table.rows[1].cells[i].innerHTML;
    switch(newcell.childNodes[0].type) {
    case "text":
    newcell.childNodes[0].value = "";
    break;
    case "checkbox":
    newcell.childNodes[0].checked = false;
    break;
    case "select-one":
    newcell.childNodes[0].selectedIndex = 0;
    break;}}}
    function deleteRow(tableID) {
    try {var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    for(var i=0; i<rowCount; i++) {
    var row = table.rows[i];
    var chkbox = row.cells[0].childNodes[0];
    if(null != chkbox && true == chkbox.checked) {
    if(rowCount <= 2) {
    alert("Cannot delete all the rows.");
    break;}
    table.deleteRow(i);
    rowCount--;
    i--;}}}catch(e) {alert(e);}}
    </SCRIPT>
    </HEAD>
    <BODY>
    <INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
    <INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
    <TABLE id="dataTable" width="350px" border="1">
    <TR>
    <TD width="32"></TD>
    <TD width="119" align="center"><strong>Activity</strong></TD>
    <TD width="177" align="center"><strong>Cost</strong></TD>
    </TR>
    <TR>
    <TD><INPUT type="checkbox" name="chk"/></TD>
    <TD>
    <select name="s1" id="s1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>
    </TD>
    <TD><input type="text" name="txt1" id="txt1"></TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    Hi,
    Let me make sure u r working with table control.
    First u have to create a event(VALIDATE) to do the validation.
    Inside the event,
    1. First get the current index where user has pointed the curson
    2. Once u get the index read the internal table with index value.
    3. Now u can compare the col1 and col2 values and populate the error message.
    1. DATA : lo_elt TYPE REF TO if_wd_context_element,
                   l_index type i.
    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
         CALL METHOD LO_ELT->GET_INDEX( RECEIVING  MY_INDEX = l_index.
    above code should be written inside the event.
    Thanks,

  • Ref2 on JE not populated for Credit Memos not based on another document

    Version: (2007A)
    Description of requirements: (Please provide a detailed description)
    When the Setting in System Initialization\Document Settings \General tab\
    Document Remarks Include is set to BP Reference Number, the Ref2 field on the Journal Entry for the document is populated with the BP Reference from the document. This is true for all documents, regardless of whether or not the document is based on another document, EXCEPT for AR and AP Credit Memos. In the case of Credit Memos, if the Credit Memo isnu2019t based on another document, the BP Reference isnu2019t written to the Ref2 field on itu2019s Journal Entry.  Our customers have complained that this makes it very difficult for them to do their reconciliations as the Ref2 is blank on the reconciliations screen for these Credit Memos.  If the Ref2 field were populated in the same manner as other documents, the Ref2 Field would contain the same BP Reference as the invoice(s) it should be reconciled with.  We have been asked to request that this functionality be added in a future patch, as it would greatly simplify the customeru2019s reconciliation and save them a great deal of time and effort.
    Business needs: (Please describe the impact on your business, if the functionality is not realized)
    It is very difficult to reconcile our Credit Memos with the correct documents, as there is no reference available on the screen to connect them to the other documents. This requires a great deal of time researching which Credit Memo(s) should be reconciled with which Invoice(s). 
    Examples: (Please describe a typical example, how the functionality should work.)
    When a Credit Memo (Purchase or Sales) not based on another document is created, the Ref2 field on the Journal Entry should be updated with BP Reference entered by the user on the Credit Memo.
    Current Workaround: (Please describe the workarounds you are using at the moment)
    None. Hours wasted trying to reconcile correctly.
    Proposed solution: (Please suggest how the new functionality should work)
    When a Credit Memo (Purchase or Sales) not based on another document is created, the Ref2 field on the Journal Entry should be updated with BP Reference entered by the user on the Credit Memo.
    Regards,
    Sally Weinrauch
    Coastal Range Systems

    hi,
    so change  field status group with trx <b>OB41</b>
    A.

  • Populating values of a field based on logged in user

    Hi,
    My requirement is as follows:
    I have a LOV input field. The LOVs for the field should be populated based on the logged in user. Every user will have a group of values associated with him.
    Example:
    USER_ID/NAME BUSINESS_UNIT_ID
    1 B101
    2 B108
    1 B106
    1 B103
    2 B105
    2 B119
    if the logged in user is 1, the LOV field should have values as B101,B106 and B103.
    Can someone help me in implementing this?
    Thanks,
    Ashok

    Hi,
    looks like you have to populate LOV based on logged in user. so make a view object which will return respective values by taking user id as input(bind variable).
    execute the vo after loging.
    ~Abhjit

  • How do I get a field to automatically select a value and change color based on another automatic field?

    Here is the situation:
    I have a row on a form called Finding Risk Rating. In this row are four fields: Probability, Severity, Risk Rating, Color.
    Probability is a drop down menu with the following values: 1, 2, 3, 4, 5
    Severity is a drop down menu with the following values: A, B, C, D, E
    Risk Rating is a field that I have a custom calculation script:
    var riskRating = this.getField("Probability").value+this.getField("Severity").value;
    event.value = riskRating;
    So, when I pick Probability = 1 and Severity = D, Risk Rating will automatically change to 1D, etc. This works fine on the surface as far as I can tell.
    The part where I am stuck, is the fourth field Color.
    Ideally, I want Color to be automatically populated depending on the value of Risk Rating. For example, for 1E I would want it to say "YELLOW" and the field to change color to yellow. For 1A it would be "GREEN" with the color green, etc.
    I tried doing an if else for all cases, but it never refreshes to the correct value. I then checked using app.alert to see what fields riskRating and colorRank are (see code below), and I noticed that riskRating never changes, even though the value in Risk Rating changes. Is there a way to order script(s) so that if I execute one, the other will follow? I'm new to scripting for forms and haven't done any programming in 10+ years, so feel free to rip my code in favor or something more efficient, or direct me to a good resource I can learn from.
    Here's the basis of what I have for scripting on Color. It's brief because I wanted to test it out before writing every 'if else' statement.
    var colorRank;
    var riskRating = this.getField("Risk Rating").value;
    if (riskRating = "1E") colorRank = "YELLOW";
    else if (riskRating = "1A") colorRank = "GREEN";
    else if (riskRating = "5A") colorRank = "RED";
    event.value = colorRank;
    app.alert("colorRank = " + colorRank + ", riskRating = " + riskRating);
    Any help is appreciated. Thanks!

    One problem is if more than one combo box item has the same number associated with it, you cannot simply set the export value to the corresponding number since they need to be unique (or the user interface behaves weird). One thing you can do is set up an object to associate a list item with a value, and look up the value in code when a list item is selected.
    For more information, see: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle

  • Populating values in dropdown fields on interactive adobe forms.

    Hi,
    In HCM Forms & Process, I have populated dropdown fields using generic service. But today I came to know we can also populate the dropdown field values using webdynpro lookup tables. First question, Is that a wrong method to populate the dropdown field values using generic service. Second question, If I populate the dropdown field values using lookup tables does the performance will increase when compared to populating from generic service. Please let me know.
    Regards,
    Nayani.

    Hi,
    In HCM Forms & Process, I have populated dropdown fields using generic service. But today I came to know we can also populate the dropdown field values using webdynpro lookup tables. First question, Is that a wrong method to populate the dropdown field values using generic service. Second question, If I populate the dropdown field values using lookup tables does the performance will increase when compared to populating from generic service. Please let me know.
    Regards,
    Nayani.

  • Issue in populating values in a column based on values in other columns

    I have a situation as below:
    Src        Tar             New tar
    AC001  TAC001  
    AC002  TAC001      AC002
    AC003  TAC001
    AC011  TAC011
    AC012  TAC011      AC012
    AC021  TCA021
    AC022  TCA021
    Now, wherw I have New target as AC002, I need to copy the same value to TAC001 which is the 1st and 3rd row. Similarly, I need to copy AC012 to 4th record. And my last 2 rows will be null as I do not have any values for TCA021..Any thoughts on this would be apprecated..
    Thanks in advance..

    Hi
    almost all is said so i tip you How to Fish (with Pictures) - wikiHow because it is good asset for future when you are hungry
    Read also http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions004.htm#SQLRF06174
    "Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause. For each row, a sliding window of rows is defined. The window determines the range of rows used to perform the calculations for the current row. Window sizes can be based on either a physical number of rows or a logical interval such as time.
    Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause. All joins and all WHERE, GROUP BY, andHAVING clauses are completed before the analytic functions are processed. Therefore, analytic functions can appear only in the select list or ORDERBY clause.
    Analytic functions are commonly used to compute cumulative, moving, centered, and reporting aggregates."

  • Value for a parameter based on another parameter value

    Hi all,
    i am using report 6i and 10g db.
    I have to create a report based on some parameter values. For example
    Two parameter named as P_emp_code and P_emp_name
    In the first parameter p_emp_code has list of values like empcode emp_full_name ie like 0002108 Vanitha Lanet Mendez
    when user select P_emp_code i want to display the fullname in p_emp_name .
    I tried as follows in list of values
    select emp_fullname from emp_master where emp_code=:p_emp_code
    then getting error bind variable cannot be used
    Please suggest a way .
    Thanks
    Rincy

    Hello,
    The thing you are asking for set and editing the reports parameter form's value. Then i don't think you can do this by using the report parameter form.
    But there are two alternatives for this task.
    1. Create one form using form builder and pass the parameter and run the report from there. So, you can use the code as you showed in your first post.
    2. Why don't you make this Title setting automatically? I Mean using the gender column (with decode/case condition) of same table.
    -Ammad

  • How to display the values in the form based on another form option?

    Hi,
    I have two forms. Based on form 1 option the form 2 should display.
    Form 2 values are stored in a separate table consists of step_id and step_name
    For example:
    In a Procedure there are multiple steps(step1, step2... step n).
    If procedure 1 is choosen from form 1 and user clicks the start button and the page navigates to another form 2.
    In form 2, step 1 of procedure 1 should display.
    Hope it make some sense....
    thank you

    You can cachieve this my passing parameter through the Branc or by setting the items in computation / process.
    1. On Page 1 on condition Proc1 chosen create a conditional branch that fires only when Proc 1 is chosen
    2. In the Branch set the Items on Page 2 with values of Items as dictated by Proc 1.
    That should do it.
    It depends a lot on what Page 2 needs to dispaly the right stuff.
    Regards,

  • How to display value of an item based on another item

    Hi,
    In a page I've to display name for the corresponding id displayed in id item.Can I write a query based on id and display name as soon as I enter into that item.if so are there any properties I need to set ?I'm looking for just post_text_item functionality in forms?
    Thanks,
    Mahender

    Hi,
    I've created sample table with id,first_name and last_name to test:
    I've created AJAX script in application process area with name GET_NAME
    declare
    v_name varchar2(150);
    begin
    select first_name||'-'||last_name into v_name from names
    where id = :P53_id;
    htp.prn(v_name);
    exception when others then htp.prn('An error occurred retrieving name'||sqlerrm);
    end;
    CREATED JAVA SCRIPT IN html headers section of the page p53:
    <script type="text/javascript">
    function get_name(){
    var id = document.getElementById('P53_id').value;
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=GET_NAME’,0);
    get.add('P53_id',id);
    var gReturn = get.get();
    document.getElementById('P53_name').value = gReturn;
    </script>
    put the following in HTML Form Element Attributes of p53_id :
    onchange="get_name(this,'P53_id)"
    It's not working ?
    Can anyone help
    Thanks
    Edited by: user518071 on Aug 14, 2009 8:14 AM
    Edited by: user518071 on Aug 14, 2009 11:04 AM
    Edited by: user518071 on Aug 15, 2009 5:02 AM

  • How to populate values in F4 help based on another F4 help in a TMG

    Hello All,
    I have created a TMG for a table. Have added that to customization also. Now, in that table I have 2 fields say carrid and connid. In the F4 help of carrid, all carrids will be displayed. Now if the user selects one carrid, the next field connid should show only those connids related to carrid. How this can be achieved in a TMG. If in a module pool, we can write POV or etc. But in TMG, how can we ?
    Rgds,
    Renjith

    See the table maintaince has events ,you can write the code under events.
    Reward Points if it is helpful
    Thanks
    Seshu

  • How to get value in custom field(Part OF BOL) in search result view.

    Hi All,
    I am new to CRM WEBUI and i am facing issue in populating value in one field of search result view.
    Current requirement is .
    On product f4 , we get search help and search result view.
    one custom field need to be added in search result view ( for eg any description field).
    This description field is already  available in one of z relation  maintained in PRODUCT root object.
    Solution tried so Far:
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field
    in setter method, set the property.
    Issue : we were not able to sort the values on this description field. so scrap this 1st approach
    2nd Approach: In Event EH_Onsearch Help, we try to use collection wrapper to get current value of description
    by using relation name .
    We use component controller to set the value of description since  searchresult view-conext node->result node is bound to one comp controller node.
    but this solution also does not work..
    Please advice us  what approach we should use to get value in description field  and sorting should also work.
    Thanks in Advance.

    Hi Girish,
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field  and by using this approach we are able to get value but sorting was not working so we disable the sorting as it was not required by business.
    if u need sorting on that field.
    then u should go for value node approach and write code for getting value in get set method
    and for sorting also , need to write code.
    This is my understanding on this .
    Please reward if this solution is helpful

  • Setting the value of a field based on a dropdown list

    I am using the latest production release of JHeadstart 10.1.3.0.91. I am trying to set the value of a field based on selecting the value of another field (drop down list). The drop down list field has the following attributes set autoSubmit="true" immediate="true" valueChangeListener="#{jhsPageLifecycle.updateModelValue}".
    The other field has the partialtrigger set to the first field. ie "depends on" selection from JHeadStart file. The value of the second field is set in the setter of the VO RowImpl java file.
    The value of that field is only populated on the screen if it is set to disabled="true". This seems a bit bizzare behaviour. Can you explain why it cannot set the value of the field when it is not disabled.

    Worked out that if i set the "Clear/Refresh value" attribute on the field that i want updated then it will work ok
    Alan

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

  • Deriving 1 Value from 2 Fields Based on Values in Fields

    I have a query that needs to return 1 of my values based on the values from 2 fields from 2 tables. However, the value should only be returned in 1 field and one of the fields should be evaluated first. If this first evaluated field has a certain value ('Y') then the other field is ignored.
    To be more clear, per the normal query below, what I want is to somehow, if possible, combine the case t2.el_contr and case t1.contr_type statements so that one field, say: mbr_contr_type_desc returns a value.
    So that if the value of t2.el_contr is 'Y' then 'SUB CHILD' is returned. It is important that this field should be evaluated first (If the value of it is 'Y' then the other field evaluation can be ignored). If this is not 'Y', then t1.contr_type should be evaluated and the values as listed below also returned to mbr_contr_type_desc.
    I know the following isn't correct, but it might better illustrate what I'm trying to do (the normal query is below this)
    case t2.el_contr
    when 'Y' then 'SUB CHILD'
    case t1.contr_type
    when 'A' then '1 PARTY MALE SUB'
    when 'B' then '1 PARTY FEMALE SUB'
    when 'C' then '2 PARTY MALE SUB'
    when 'D' then '2 PARTY FEMALE SUB'
    when 'F' then 'FAMILY MALE SUB'
    when 'G' then 'FAMILY FEMALE SUB'
    end as mbr_contr_type_desc
    In an Access query I would do the following in a column:
    iif([el_contr]='Y',"SUB CHILD',SWITCH([contr_type]="A","1 PARTY MALE SUB",[contr_type]="B" etc.))
    *NORMAL QUERY*
    select t1.ssn
    t1.type,
    t1.grp_id,
    t1.contr_type,
    t2.el_contr,
    case t2.el_contr
    when 'Y' then 'SUB CHILD'
    end as mbr_contr_type_desc_2,
    case t1.contr_type
    when 'A' then '1 PARTY MALE SUB'
    when 'B' then '1 PARTY FEMALE SUB'
    when 'C' then '2 PARTY MALE SUB'
    when 'D' then '2 PARTY FEMALE SUB'
    when 'F' then 'FAMILY MALE SUB'
    when 'G' then 'FAMILY FEMALE SUB'
    end as mbr_contr_type_desc_1
    from member_elig t1
    inner join grp_master t2 on
    t1.grp_id = t2.grp_id

    Perfect!
    Thanks, didn't know that existed. Still learning my way around pl/sql..
    One other (unrelated) question..when i hit the CTRL+LEFT ARROW* button in my SQL window, it will not tab back. This is really annoying! I have looked through PREFERENCES-EDITOR and can't seem to find any setting that will allow this. Do you know of any way to change this so I can tab backwards/fowards through code in the SQL window?
    Thanks for any suggestions!
    *Or CTRL+RIGHT ARROW for that matter..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Printing to a Printer connected via HP JetDirect using original HP drivers

    Hi, I have bought a new router (AVM Fritz wlan 7170) which has a printer port that uses an emulated HP JetDirect Server for printing. Is it somehow possible to use the original HP Inkjet Drivers v2.7.1 for printing to my Hewlett Packard Deskjet 5652?

  • Recording videos from my Mac Screen

    I would like to record in a video file (mov for example) my Mac screen showing Google Earth overflying a region in the world and incorporate this video in a montage of my vacation trip. There are an awful lot of various software or sharewhare offerin

  • An alignment problem of format mask in PDF output

    Hi, I'm testing iAS10g on WIN2000. Both the Reports Developer and Reports Server versions are 9.0.4.2. The database character set is UTF8, and I'm using Adobe asian font pack in the [PDF] section of the uifont.ali config file to print Chinese charact

  • Sent items on yahoo Imap not synchronising with sent items on yahoo mail outlook 2011

    I had a problem where the my yahoo imap  which I set up with Outlook 2011 was not synchronizing with Yahoo from the web. I found the solution today by switching from Sent items( Server) to Sent( Server). 1. Go to tools 2. Accounts 3.Advance options 4

  • I cannot download Facebook and I don't have a blackberry world icon

    I have just purchased a secondhand blackberry curve 8310 from ebay and I cannot download Facebook and I don't have a blackberry world icon on the home page. When I try to download facebook it says my device does not support this function. I have tri