AutoFill year + 4 based on another field of the year

Hello

I tried to change another script I found, but I really don't understand it well enough to make it work.  I use Adobe Acrobat Pro XI.

I calculate the expiry of an extended warranty.  All dates are entered with the MM-DD and YYYY in separate fields, because of the shape of the manufacturer.

First Date is manually entered, date of initial purchase.

2nd date is already set up to automatically fill in the current date.

date of 3rd is where I need help.  I have the MM and SD as a field duplicate of the first date, it works very well.  I need the "Year_3" field to automatically add the 4 years to the AAAA of the field 'Year' from the first date.

Any help is appreciated.

If the first field is called year1, use this code to custom for the second field calculation:

var year1 = this.getField("Year1").valueAsString;

If (year1 == "'") event.value = "";

else event.value = number (year1) + 4;

Tags: Acrobat

Similar Questions

  • Choose field from the joined table based on another field?

    Hello!

    Is it possible to select a field in a row of attached table based on another field? Consider the following data in the CVALUES table:
    ID  C1   C2    C3    C4    C5    C6
    T1  9.6  10.3  12.4  19.6  19.6    0
    T7  9.6  10.4     0     0     0    0
    T3  8.2   9.9  11.4  19.6  19.6    0
    T8  8.3  10.7  13.5  20.7     0    0
    T5  9.4  10.3  12.7  22.9  19.6    0
    ...
    And the following data in the table MDETAIL:
    ID           MDATE        CNUM     ...
    T1  03/28/2012 18:00:00    4
    T1  03/28/2012 18:00:00    1
    T8  03/29/2012 06:00:00    6
    T8  03/29/2012 06:00:00    5
    ...
    I want to get the column corresponding to the VALUE field in the table MDETAIL CVALUES. I'm doing this:
    SELECT m.t1, m.mdate,
           CASE WHEN m.cnum = 1 THEN c.c1
                WHEN m.cnum = 2 THEN c.c2
                WHEN m.cnum = 3 THEN c.c3
                WHEN m.cnum = 4 THEN c.c4
                WHEN m.cnum = 5 THEN c.c5
                WHEN m.cnum = 6 THEN c.c6 END AS cvalue
      FROM mdetail m
      JOIN cvalues c ON m.id = c.id
    The CVALUES table records are unique; only one line by ID.

    This method works and it's fast, but it's messy code and I think there must be a better way to do it. I use cvalue value in several calculations so each calculation that I use is this giant glob of CASES inside!

    Hello

    With a decoding it would be easier, but as ugly :-)

    SELECT m.t1, m.mdate,
           DECODE( m.cnum , 1 , c.c1, 2, c.c2, 3, c.c3, 4, c.c4, 5, c,c5, 6, c,c6) cvalue
      FROM mdetail m, cvalues c
      WHERE m.id = c.id
    

    Success!

    FJFranken

  • Make a mandatory DFF field based on another field

    Hi all

    We have a requirement where we need to do a mandatory DFF field based on another field.

    example:

    FDF has two fields:

    Depose1: the values 'Email', 'Fax '.
    Depose2

    If "Email" is selected in 'Field1' Field2 should become mandatory.

    All entries on this will be really useful.

    Thank you and best regards,
    Satya.

    Please see old topics that cover the same subject - http://forums.oracle.com/forums/search.jspa?threadID=&q=DFF+AND+mandatory+ANd+Dependant&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001

    Thank you
    Hussein

  • Display list items based on another element of the list

    Hi all

    I want to display the list item based on another element of the list, but his does not work.

    This is my code:


    / * WHEN-NEW-FORM-INSTANCE * /-his work.
    DECLARE

    rg_district recordgroup;

    rg_name VARCHAR2 (40): = "district";

    vtemp NUMBER;

    BEGIN

    rg_district: = FIND_GROUP (rg_name);

    IF ID_NULL (rg_district)

    THEN

    rg_district: =.

    CREATE_GROUP_FROM_QUERY (rg_name,

    'select dist, dist district_mas.

    );

    vtemp: = POPULATE_GROUP (rg_district);

    POPULATE_LIST ('BLOCK3.) Of RIDING ", rg_name);

    END IF;

    END;

    * / CHANGED AFTER a - list * /-does not work. Cannot complete the list based on the list

    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    ("rg_branch",

    "SELECT FROM dist_branch WHERE district IN branch (DIST DISTRICT_MAS WHERE DISTRICT = SELECT').

    || : BLOCK3. DISTRICT OF

    );

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END IF;

    END;

    Table:

    CREATE TABLE DISTRICT_MAS

    (

    DIST VARCHAR2 (100 CHAR)

    );

    CREATE TABLE DIST_BRANCH

    (

    NEIGHBORHOOD VARCHAR2 (100 CHAR),

    DIRECTORATE GENERAL OF THE VARCHAR2 (100 CHAR)

    );

    Values:

    insert into district_mas values ('chennai');

    insert into district_mas values ('coimbatore');

    insert into dist_branch values ('chennai', 'chennai_north');

    insert into dist_branch values ('coimbatore', 'Podanur');


    Concerning

    Nassik M

    I tested the code below when the list has changed


    DECLARE

    rg_branch recordgroup;

    rg_name1 VARCHAR2 (1000): = "branch";

    vtemp NUMBER;

    QT VARCHAR2 (10): = "';

    BEGIN

    rg_branch: = FIND_GROUP (rg_name1);

    IF this is ID_NULL (rg_branch)

    THEN

    DELETE_GROUP (rg_name1);

    END IF;

    rg_branch: =.

    CREATE_GROUP_FROM_QUERY

    (rg_name1,

    'SELECT branch, branch OF THE DISTRICT WHERE the dist_branch =' | QT | : BLOCK3. DISTRICT OF | QT);

    vtemp: = POPULATE_GROUP (rg_branch);

    POPULATE_LIST ('BLOCK3.) Branch of THE ', rg_branch);

    END;

    Hope it's work...

    Hamid

  • Trying to create a trigger that adds a value to a field based on another field

    Hello

    Im trying to set a trigger that will add a field to a table if another field = the same thing and one where the condition is met, but can't seem to get anything to do and can't find anything online suggesting the syntax.

    the use of im tables are

    Applications_History

    Students

    I need the trigger to identify if the 'status' field = applicant accepted when a new data column is added, if that is the case I need to identify the scope of student_number of applications_history and match it to the student_number on students field, I then need to add a 'Y' in the field 'put' corresponding to this student in the student table. I'm looking for without stopping for some type of syntax format online but could not find anything, is it still possible?

    Thank you

    Something like that?

    create or replace trigger aiur_applications_history

    after insert or update on applications_history

    for each line

    Start

    If nvl (: old.application_status, 'x'). = 'candidate admitted '.

    and: new.application_status = 'candidate admitted '.

    then

    students update

    the value = 'y '.

    where student_number =: new.student_number;

    end if;

    end;

    /

    Kind regards

    Zlatko

  • Need a field order and tab based on another field

    It seems that this is possible, but I can't find any information.  Maybe I'm not asked the question properly.

    Based on my document attached if the CPFF tax type is selected, then I want the tab order to move the field of cost of the project and all the fields to the right.

    These fields should be required if the CPFF tax type is chosen.  If any other type of charge is selected the tab order should move to the next field.

    It is also possible to disable the tab in the fields such as kind of cool, the cost of the project, etc.?

    Thank you!

    I believe that when you say that the tab order, you mean developed and access.

    The code below, attached to the event exit the drop-down list controls, if "CPFF - fixed cost" was unsuccessful. If it was not selected, I change the access of ProjCost property, FixedFee and Total in 'read only' and set the focus on TextField1. In the contrary case, tab order is applied and ProjCost, FixedFee and Total are rendered user entered - optional by setting the property of access «»

    Form1. #subform [0]. Table3.Row1.DropDownList1::exit - (JavaScript, client)

    If (this.rawValue! = 'CPFF - more flat fee') {}

    Table3.Row1.ProjCost.access = "readOnly";

    Table3.Row1.FixedFee.access = "readOnly";

    Table3.Row1.total.access = "readOnly";

    xfa.host.setFocus (TextField1);

    }

    else {}

    Table3.Row1.ProjCost.access = "";

    Table3.Row1.FixedFee.access = "";

    Table3.Row1.total.access = "";

    }

    Steve

  • PPR initialize a field based on another field user input

    My requirement is I have 2 fields in the VO and user enters in the first field employee number and when it has tabs on
    I should fill in the 2nd field dynamically from database using the EMp num is entered.

    I followed the details according to the OFA dev guide (section Cascade of data changes) but unable to achieve.

    Can help you?


    > > > > >
    Cascading data changes
    Updated data values when the user changes the value in a given field, for example, if the user specifies a provider
    value you want to set the default provider site, follow these instructions:
    11.5.10 notes: OA Framework architecture team is always present in the recommended for implementation
    data cascading. You can follow the instructions below to get an idea of how it works, but is not production
    ready for the random sequencing of the game BC4J < attribute > method call means this special focused on the EO
    method for establishing these values is not reliable.
    Step 1: Set up an messageTextInput element to emit an event PPR (see step 1 in the changing properties of user interface
    (See above). When the value data is changed and a PPR event is raised, OA framework sets the selected data on the
    the underlying view object.
    Step 2: Assuming that the purpose underlying the view is based on an entity object, the Poser of entity object associated with
    with RPP source element must implement the logic to call setters on the target object entity
    attributes. For example, in a purchase order header, the setSupplierID() method calls of the SupplierEOImpl
    Entity expert to get the ID of site default provider, that then passes it to the setSupplierSiteID()
    method.

    Hello

    Yap I expected this problem which is y I gave the code with the value 'true' initially,.

    two things I can suggest,
    realize again, then

    1.), false to validation side customer set or false validation server for this contract num field
    Try again with the code in the same handwriting in processRequestMethod

    mtsecBean.setUnvalidated (true); (try this one first)

    in case of problem also try with this one

    mtsecBean.setServerUnvalidated (true)

    or

    2.) hide this contactnum field and create new through customization

    thanx

    Pratap

  • Update a field in a sequence based on another field

    Hi all

    Small problem: -.

    CREATE THE TABLE:
     CREATE TABLE SEQTABLE 
    ("GRP_NUM" VARCHAR2(20), 
    "ORDER" NUMBER(5), 
    "NEW_GROP" VARCHAR2(20) ) ;
    DATA: -.
     
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP"     )     VALUES ('POIP1234567891234567' ,1 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('POIP1234567891234567' ,2 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('POIP1234567891234567' ,3 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('LKJG1234567897412589' ,1 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('JHGF1234567891234567' ,1 ,''  )
    INSERT INTO SEQTABLE ("GRP_NUM" ,"ORDER" ,"NEW_GROP" ) VALUES ('JHGF1234567891234567' ,2 ,''  )
    SELECT *.
     
    SQL> SELECT * FROM SEQTABLE;
    
    GRP_NUM                ORDER        NEW_GROP
    --------------------       ----------       -------------
    POIP1234567891234567          1
    POIP1234567891234567          2
    POIP1234567891234567          3
    LKJG1234567897412589          1
    JHGF1234567891234567          1
    JHGF1234567891234567          2
    Here my problem, I need to generate a smaller GRP_NUM in the field of the NEW_GROP. But can't just Substr field of origin. This field must be uniquie to the group.

    Desired results: -.
     
    GRP_NUM                  ORDER        NEW_GROP
    --------------------        ----------       -------------
    POIP1234567891234567          1             10001
    POIP1234567891234567          2             10001
    POIP1234567891234567          3             10001
    LKJG1234567897412589          1             10002
    JHGF1234567891234567          1             10003
    JHGF1234567891234567          2             10003
    Any ideas guys
    me@MYDB> create table newgroup (id number,grp_num VARCHAR2(20));
    
    Table created.
    
    me@MYDB> create sequence seq_newgrp_id start with 1000 increment by 1;
    
    Sequence created.
    
    me@MYDB> insert into newgroup select seq_newgrp_id.nextval,grp_num from (select distinct GRP_NUM  from SEQTABLE);
    
    3 rows created.
    
    me@MYDB> commit;
    
    Commit complete.
    
    me@DBADB> select * from newgroup;
    
            ID GRP_NUM
    ---------- ------------------------------------------------------------
          1001 JHGF1234567891234567
          1002 LKJG1234567897412589
          1003 POIP1234567891234567
    
    me@DBADB> UPDATE seqtable s
       SET s.new_grop =
           (SELECT n.id FROM newgroup n WHERE s.grp_num = n.grp_num)
    
    me@MYDB> commit;
    
    Commit complete.
    

    Edited by: Kecskemethy November 18, 2010 01:55
    Update added at the end

  • A field based on another field of time stamp setting

    I have 3 fields in the custom object 1 labeled (a list of choices) status of the Transaction, on Hold time and off hold time. The drop-down list contains the value "pending." When this value is selected, I can successfully timestamp field on time to keep using a workflow rule (PRE ("< plTransaction_Status_ITAG > '") <>[< plTransaction_Status_ITAG >]) AND [< plTransaction_Status_ITAG >] = ValRech ("OCC_CUST_ZOBJ_1_LOV_12", "Pending").

    When the Transaction status is changed to something other than 'pending' after having been in this situation, I need to stamp the "Off Hold Date/time field", but only after the "On Hold Date/Time" field contains a value that is earlier than the current date and time. I tried to use a workflow rule, but this doesn't seem to work properly and timestamps each time that the value of 'The Transaction status' is changed.

    In my view, a default value in the field ' Hold Off Date/Time ' should work, but have no idea on how to do it.

    Can anyone provide any assistance would be appreciated.

    Thank you
    Neil

    Published by: user1815782 on July 15, 2009 09:39

    Neil,

    Have you tried

    PRE ("") = 'Pending' and queued more than today() date/time?

    see you soon
    Alex

  • Tabular presentation - column to turn it off (with picture) based on another value of the column

    Hi all

    I haven't worked much on tabular forms and JS. I'm looking for help in this regard.

    I'm working on a tabular presentation. with several editable fields... I need to disable a column (just for this single line), which contains an image, based on a field of LOV (static) list) (Y/N). The image column must be disabled if the value is N.

    My SQL for the report is something like this: (will keep things simple)

    Select

    emp_id,

    emp_name,

    static_list,

    (case when STATIC_LIST = "Y" THEN ' < a title = "Edit SAMPLE TBL" href = "f?) p = & APP_ID.:10: & APP_SESSION.:NO:P10_EMP_ID, P10_EMP_NAME :'|| EMP_ID | «, » || EMP_NAME | "" "> < img src =" "#IMAGE_PREFIX #SAMPLE.gif" border = '0' (> < /a > ' other ' ' end) as disable_col, "

    dept_name

    of sample_table

    I scoured the topics in this forum. Most of them were made using the table ID f_001, f_002.

    I tried to follow the same path by inspecting the item but the disable_col does not have any ID.  Let's say, f_003 is for the static list and f_004 is assigned to dept_name.

    I tried dynamic actions, but it did not work. Read in a topic that dynamic action does not work on tables. So I chose this approach. Is there a simpler way to solve this?

    need your help on how to proceed with this scenario. Thank you in advance.

    Versions: Apex: 4.2, DB: 11 g

    Thank you

    Daniel

    Hi Daniel_A,

    Daniel_A wrote:

    I did my job in Page 4.

    If the IS_VALID column is select as 'Yes' then the column hyper must be enabled, allowing the user to click on it. If she chose the 'no', then the column Hyper must be disabled for this line.

    The initial question about toggle the hyperlink is resolved. Check your App-> Page 4 35160.

    This is done with the help of two dynamic actions:

    • DA first loading of the Page / after updating of region "tabular":

    Event: After refresh

    Selection type: region

    Region: The other 'tabular '.

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: Yes

    Code:

    $( 'select[name="f08"]' ).each(function() {
      if ( $(this).val() === "N" ) {
        $(this).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
      }
    });
    

    Items concerned: no item affected

    • Second DA on the evolution of the selection list:

    Event: change

    Selection type: jQuery Selector

    jQuery Selector: select [name = "f08"]

    Condition: No strings attached

    Action: Run the JavaScript Code

    Fire on loading the Page: No.

    Code:

    var el = this.triggeringElement;
    if ( el.value === "N" ) {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").addClass("apex_disabled").unbind("click");
    } else {
        $(el).closest("tr").find('td[headers="HYPER"]').find("a").removeClass("apex_disabled").bind("click");
    }
    

    Items concerned: no item affected

    NOTE: as the original question/topic related to toggle the image link in the column, for the problem with the Page 5, please create a new thread with the details.

    Kind regards

    Kiran

  • Function to analyze the value of a field to another field of the contact form contact

    HI - we need for the reports to be able to take part of the chain of values in a field.

    For example we would bring in a field called Service_Name and take the Tactic_Code starting from the attribute and put it in another field of tactical called contact Code as shown below.

    Does anyone know how to do this using a feature in the program generator. I tried using a rule to update but could not understand it.

    Any help would be greatly appreciated.

    Blake

    Service_name = a been of _CH_ [Marketing_Channel] = [Campaign_Name] [Tactic_Code]

    Tactic code =[Tactic_Code]

    Yep, Michael there as usual, it is the way to go. You will need a regular expression (regex - if you are not familiar with the regular expression, a good tutorial is here: Regular Expression Tutorial - Learn how to use regular Expressions) pull the tactical code out of your service name - you want to use the 'replace regular expression' in cloud connector.

    I think it should work, but you'll want to test:

    Regex to find:. * ? T_(.*)$

    The regular expression to replace: $1

  • How can I do if data is entered in a field where it is mirrored on another field in the document?

    I don't want them even named as I don't want the other appearing until it is entered in the first field.

    Hello

    If the fields in the form have the same name then the data entered in a field is filled automatically in others for the same name. For example, if there is a form field custom field named 1 in a document, and there is another domain with the same name (custom field 1) in the other document and download you together in a single transaction and send the document, then the data entered in the document in a custom field 1 will be automatically entered in the custom field 1 another document as well. This also applies to a single document only as well.

    Does that help?

  • Defining a field based on another field auto-fill form

    I create a dashboard to be used by my businesses inside sales group.

    I need to define the shape so that if the data is entered in a field, a number will automatically fill in another area.

    Example:

    IF a "follow-up quote # ' field, THEN a 3 will automatically be in the fiield"Pts"corresponding

    IF a field "new perspective - client ' is filled in, THEN a 10 will be automatically in the corresponding"Pts"field

    IF a "New quote # ' field, THEN a 5 will be automatically in the"Pts"correspondng field

    Sample form below for visual

    Capture.JPG

    You can use something like that than the calculation script custom field Pts:

    event.value = (this.getField("NameOfOtherField").valueAsString=="") ? "" : 3;
    
  • change LOV based on another field value

    I have a need to change the LOV selection list element of a page based on the selection in the selection list on the page another element. In other words, for a page element that is a selection list, so I need to use a LOV normally and a different LOV if the value of a different page element is set to X.

    Dynamic action would be useful here (change where select list 1 = x), but I do not know how to take the measurements of the evolution of the LOVsfor select list 2 based on this action.

    Thanks in advance!

    John

    Assuming you are using apex 4.0 or later...

    Article P23_GEAR

  • Select P23_GEAR_TYPE as "LOV cascade.
  • Place the items P23_SEASON, P23_FIELDOFFICE as "Page Elements should send"
  • Put the SQL query

    select distinct gear_code d, gear_code r
    from gear_lk
    WHERE :P23_GEAR IS NULL OR :P23_GEAR != 'S'
    UNION
    select distinct gear_code d, gear_code r
    from season_gear_office_lk
    where season_code = :P23_SEASON
    and field_office_code = :P23_FIELDOFFICE
    and  :P23_GEAR = 'S'
    

    It will be useful.

    Kind regards
    Hari

  • Hide the individual fields of a group (radio button) based on another field

    Looked through the archives, but couldn't find the answer, who worked... THANKS in advance.

    A form that contains a radio 2 field (named funding) group - 'Cash' or 'other '.

    The group following (FinancingType), which is independent now, is a group of radio buttons of the 5 field - "Cash", "FHA", "GO", 'Classic' and 'other '.

    "Cash" is selected in the first group, I want to [FinancingType]. Button of Cash to choose (what I work via a trigger MouseUp)

    If (event.target.value == "Cash).

    this.getField("FinanceType").value = 'Cash ';...

    However, I want the other 4 fields greyed out or hidden.

    In addition, if the radio button "Other" is selected, I want to [FinancingType]. Button of cash to be gray or hidden.

    (ps. I know just enough coding to get in trouble!)

    Yes, you can. The code would be:

    this.getField("FinanceType").readonly = true; or false, change it back

Maybe you are looking for