Field with a default value from another field

I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
Topic
Acrobat 5 - field with default value of another field
Ben PF - 03:31am Mar 23, 2007 Pacific
How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
I've tried, but I just can't figure it out!
Any help much appreciated.
Ben
| Back to Topic List | Bookmark | Subscribe
To start a NEW discussion click on the Back to Topic List link and select Add Topic.
If you are in an archive forum please go up to the main topic list (archives are read only).
Messages
2 messages. Displaying 1 through 2.
First Previous Next Last Show All Messages
Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
This, or some variation of this, should work:
if(this.getField("date2").value == ""{
this.getField("date2").value = this.getField("date1).value;
| Bookmark back to top
Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
Thanks very much.
I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
Thanks for your help.
Ben

Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
Put this:
this.getField("myField2").value = event.target.value;
Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

Similar Messages

  • Default value from another table in dummy field on a portal form ..

    A form based on a table :
    id
    name
    xx_id
    I created a dummyfield on the form in which i would like the
    name corresponding to xx_id -> I would like to fetch a value
    from another tabel into a dummy field.
    thanx
    Trine Hindsholm

    I could do this task by creating the form manually - is there anyway I can modify the insert for a form created by the wizard?

  • AutoPopulating a field with a string plus value from another field

    Hi: I have a table with two fields
    create table LINKREQUEST (
    requestid int primary key,
    INCIDENT_NUMBER varchar2(16),
    REQUESTID is auto populated using a sequence. I want to auto populate the INCIDENT field with the string "INC" plus the value from REQUESTID. Can someone help.
    TIA
    Ravi

    REQUESTID is auto populated using a sequence. I want to auto populate the INCIDENT field with the string "INC" plus the value from REQUESTIDSomething like this?:
    SQL> create table linkrequest (
    requestid int primary key,
    incident_number varchar2(16)
    Table created.
    SQL> create sequence linkrequest_seq
    Sequence created.
    SQL> create or replace trigger linkrequest_trg before insert on linkrequest
    for each row
    begin
    select linkrequest_seq.nextval,
            case when :new.incident_number = 'INC' then 'INC' || linkrequest_seq.nextval else :new.incident_number end
       into :new.requestid, :new.incident_number from dual;
    end;
    Trigger created.
    SQL> insert into  linkrequest (incident_number) values ('XY')
    1 row created.
    SQL> insert into  linkrequest (incident_number) values ('INC')
    1 row created.
    SQL> insert into  linkrequest (incident_number) values ('VW')
    1 row created.
    SQL> insert into  linkrequest (incident_number) values ('INC')
    1 row created.
    SQL> select * from linkrequest
    REQUESTID INCIDENT_NUMBER
             1 XY             
             2 INC2           
             3 VW             
             4 INC4           
    4 rows selected.

  • Choice field with no default value

    I have a field in a list that is a multiple select check box field and do not want to have a default value in InfoPath form.  I have searched and tried using blanks and different calculated formulas and have struck out.  Any ideas?  Thanks!
    David

    Try below:
    http://social.msdn.microsoft.com/Forums/en-US/6a2b4230-49e2-45a4-96d3-c2539d35d78c/infopath-dropdown-list-select-some-value-by-default?forum=sharepointcustomizationlegacy
    http://geekswithblogs.net/KunaalKapoor/archive/2012/06/26/infopath-dropdown-remove-clear-blank-rowitem.aspx
    Regular Dropdown (Pulling from DataSource)
    1. Double click on dropdown field in the data
    source.
    2. Select Fx button for Default value.
    3. Select Insert field or group.
    4. Select secondary xml from data source.
    5. Select “value” and click on ok.

  • Default value from another table - sql query

    I'm trying to make the default value of a text item as the result from an sql or pl/sql statement. I keep getting errors when I try to use a pl/sql statement to do this. Has anyone else done this?

    OK, here is what I tried to put in. I have a form and I wanted to add a text field that is derived from another table, such as:
    select question from qa_main where seq=:quest_num
    So, what I want is to have a form where questions on tests are answered, and I want the text of the question to be brought over from the question table. I'm not sure if I'm using the correct syntax, but the ":quest_num" would be a reference to a question number in the answer table that is linked to the sequence number (primary key) in the questions table.
    Of course if there are better ideas, please let me know. :)

  • Field validation - make field required based on value of another field

    Hi,
    I tried to enter the field validation into both LeadSource and stSource_Detail field, however, when the LeadSource is not "Customer" or "Staff" and Source Detail is not empty, the validation message will prompt. Below is my field validation:
    IIf(([<LeadSource>]=LookupValue("OCCAM_LEAD_SOURCE", "Customer") OR [<LeadSource>]=LookupValue("OCCAM_LEAD_SOURCE", "Staff")) AND [<stSource_Detail_Staff_ID__Customer_ID_ITAG>] IS NULL,N,[<stSource_Detail_Staff_ID__Customer_ID_ITAG>])

    Field Validation statements must return only TRUE or FALSE. Rewrite your statement such that if your condition is valid, true is returned, and if not, false is returned.
    Thom

  • Set Default Value based on Field from another table for a custom object

    I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
    The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
    I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
    If anyone knows how to enter this I'd really appreciate the help.

    Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
    Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
    The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
    In your case, ref_record_type is '<Account>', foreign_key is &#91;<AccountId>&#93;, and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
    Give this a shot and let me know how you do.
    Thom

  • Not allows to assign default value to input field using values in datastore

    Hi Masters,
    Consider that I have one input field in a form. I should assign default value to it. I should assign to it, the value which i have stored in a datastore. When i run the application, if i give default value as 123 ,then it is working fine i.e., it is showing 123 in the textfield in form , but if i give the default value as STORE@ProductId, then it is not displaying that value in the form.
    Please help me out.
    Thanks & Regards,
    Kaushik Sreeram

    Hi,
    i faced this problem and here's what i concluded:
    There's no way you can set default value for input field dynamicly, since the default value of input control is caculated only once (i think on initializing of the iView). The input control and the data store are initialized at the same time, STORE@productID is empty that time...
    If you don't need to recieve value through the input field you're trying to initialize, but just to display the value from the store - I suggest you try using another control - Expression Box. It's value is calculated continiously, just like the Label's, and you can refere to it later.
    Regards,
    Yulia

  • How to set a default value for particular field in SRM PO Portal

    Dear Gurus,
    Im desparetly need a help in web dynpro on how to set a default value for a field(flag) in PO header tab in portal.
    My requirement is whenever the user press the edit button in PO screen,automatically a flag field should be set as abap_false.
    I dont think this will handle in check badi or change badi. i tried this part in onbuttonpressed overwriteexit in CNR_VIEW views,i can get the function EDIT in debugging mode,but dont know how to proceed further.....
    Many of them suggested to go with get attribute and set attribute for changing any particular field in web dynpro,but im not very familiar in using those get and set attributes.I request you people can give me sample code on how to identify my target field in the node and set the values while pressing EDIT Button.
    Thanks in advance...
    Regards,
    Sathish

    Dear Laurent,
    Thanks for your response,
    But i searched in enhancement spot of WD_BADI, but couldnt get the exact way to change the coding,
    My real requirement is, that particular flag should be enable and disable dynamically by checking a condition in my header values.So in that case i dont know how to proceed further to handle in the PO screen.
    Kinly guide me how to get the particular node of field in the Purchase order screen.
    Thanks you in advance,
    Sorry for the inconvenience if any
    Regards,
    sathish

  • 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

  • Default value to a field in PBO

    Hi all,
    I need to set a default value to a fields in a screen.
    But when  i declared field as NUMC , i am not able to store 0 (zero value) into it .
    and also when iam declaring as  integer also iam not able to store 0 .
    Pls anybody let me know how to set the defualt value.
    its urgent

    Hi Madhavi,
    This is the issue with NUMC type field. It will not display zero on the screen. As you want it only numeric field then NUMC not suit your need as it can also store CHAR values. So you better declare it as CHAR field and in the code give error if someone enters CHAR values for that field like below.
    IF l_field CA sy-abcde.
    ERROR -Only numeric values allowed.
    ENDIF.
    Regards,
    Atish

  • Can you use a formula field as the default value of a parameter?

    I'm wondering if you can use a formula field as the default value of a parameter. I have an date parameter that is being pulled from a stored procedure. When I run the report, it defaults to the current date and time. I would like it to default to he current date and have the time be 00:00:00

    Hi,
    Unfortunately, you cannot use a formula field as the default value of the parameter.
    And, to get rid of the current time and show 00:00:00, all you need to do is Edit the parameter and set the 'Default Value' to 00:00:00. This will take care of the time portion, however the date portion would be set to the year 1899 and not the current date.
    Hope this helps!
    -Abhilash

  • Default Value of status field been shown as "Open"

    Hi All,
    I am facing some error regarding the status field in service request record type.The status field is showing as "open"when i had created a new service request but its not been reflected under service request detail page eventhough its not been present in piclklist.I want to remove open status as not been shown as open under service request list page.Please suggest me how can remove that "open" from status field,Thanks in advance.
    Regards,
    Manish.

    Hi
    You can go to the field setup of service request and edit the Status field. In Default Value give "" to denote null.
    By default the system gives open. So when you give the double quotes the new records created would have status as null.
    Hope this helps.
    -MR

  • Need to set default values for the fields plant and location in ME21N

    Hi All,
    i need to set default values for the fields plant and location in ME21N tcode.
    In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
    How to resolve this?
    Thanks in Advance

    hi .
    i needed to set default strorage location and plant in personal setting  in me21n.
    i solve it with this way.
    go to program SAPLMEPERS in se38.
    create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
    in this module write:
    if MEPOITEM_PROP-WERKS is INITIAL and  MEPOITEM_PROP-LGORT is INITIAL.
    MEPOITEM_PROP-WERKS = '1000'.
    MEPOITEM_PROP-LGORT = '0032'.
    endif.
    this is the solution.
    best regards.
    maryam

  • I want a sum to include values from duplicated fields

    How do I set up my total to also include the value from added fields?

    Kit you want to use the simplified field notation option with field names that include punctuation or space, you have to escape each special character with a backslash. So "name1.1" would be entered as "name1\.1"

Maybe you are looking for

  • How to display a time greater than 24hrs?

    Hi all I am trying to create a wages tracker by entering start and finishing times for each day, working out the time worked and then adding it all together to get a weekly value. This works fine and if I have 5 days at 9hrs it correctly gives me 45h

  • Send a Mail with Body

    Hi all, I want to send a mail with text in the body...I've read some threads in the Forum but i don't understand such well... Wich is the minimun SP version I need to be possible send mails with body? I think I've SP12 or SP13. Where can I look my SP

  • How to turn off spell check

    What do I need to do to remove spell check when typing (turn off and on) as I type messages in different languages

  • Vendor Master Number validation

    Hi, I want to create  vendor master as  123456789A i.e first 9 digits is number and the last is the alphabet, this can be achieved with number range as 000000000A to199999999Z, but my problem is, even if I do not maintain the last unit as alphabet th

  • Adobe Reader for Mac messes up my mouse driver

    After installing the latest version of Adobe Reader for Mac on Tiger 10.4, viewing any .pdf file has the effect of changing many of my single mouse clicks into double mouse clicks until reboot.  It begins when I click on the page-down sidebar and the