Add and/or subract data values in form fields

I'm trying to have a date value in one field calculated from another. For example Issue date field plus 90 days = Contract Due data field. Is there a way, maybe javascript to do this in a ADD form?
Thanks for any help,
Tony

Hi Tony,
instead of trying that with javascript, I´d rather create a Custom Trigger
(type: AFTER) which updates your table´s "contract_due" column by applying MySQL´s DATE_ADD function to ADDT´s transaction value
($tNG->getColumnValue("column_name")), like this:
"UPDATE tablename SET contract_due = DATE_ADD(".$tNG->getColumnValue("issue_date").",INTERVAL 90 DAY) WHERE primary_key_column = ".$tNG->getPrimaryKeyValue()."";
That should work, although I´m not sure if you would first have to convert the value of $tNG->getColumnValue("issue_date") back to a valid MySQL date format
(YYYY-MM-DD), in case the field "issue_date" displays the date in a different format, like e.g. DD.MM.YYYY
However I think that a javascript based approach should be avoided whenever possible, because even if that works, the user might modify the "contract_due" field value before submitting the data.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver

Similar Messages

  • When I try to use the Submit Form button on the Interactive PDF I created (IN Design CS6) I get this message. "There is no value in form field 'Program.' Please put in it before proceeding. What can I do to fix this and make the Submit button work?

    When I try to use the Submit Form button on the Interactive PDF I created (In Design CS6), I get this message:
    There is no value in form field "Program." Please put in it before proceeding.
    How can I fix this and make the Submit Form button work?

    Are you running modified software on your phone?  This error seems to be common if the firmware has been modified and you're trying to restore the phone again. 

  • How to make qury form and copy one data from one form to another

    Hi,
    i would like to develop a form which is used to query a particular data and copy that data to other form.
    Thanks

    Hi,
    i have to develop two form namely memo and chalan.
    memo will generate by different departments and send to store department to create a chalan.
    first memo data will enter by department and this memo no will send to store department.
    store department will find that memo by find button and data should copy from memo form to chalan form

  • Setting default value for form field assoc with a table column

    On a "Create Record" situation I was trying to set the default values of some form fields using a page level "Process". These form fields have Source Type = Database Column. It wasn't working, I could only set non-db assoc form field values no matter when the "Process" was set to exec. From some other posts it seems that this is by design, ie. not being able to programatically set the initial values of form fields that are sourced to db columns. I was hoping to have just one "Process" that would exec to set these initial values in one place rather than scattered about for each field that needed a default value. These particular default values come from ref tables and may be different for each user.
    So, it looks like I have to use a "Default Value" plsql chunk for each field on the form itself or else set their value on the calling form's Redirect in the "Set these Items" area.
    Is this correct?

    You could define a database function which accepts the name of the item and the user ID of the user running the application. Based on the item name and the user ID have the function return the appropriate initial value. Invoke this function in a "Default Value" PL/SQL block.
    Does that help in centralizing your initial values? You could have one function per page or one function per application. I would do one function per application.

  • Fix a data value in a field (to be by default)

    Dear all,
    Does anyone knows how can I fix a data value in a field, i.e, to be by default when I first execute a transaction?
    Another thing, in version ECC 6.0, can I export a excel document directly without using the option "save as"? My user just want to visualize the xls document, and not saving the file to some directory. Is this possible in 6.0?
    Thanks for your help.
    Regards,
    CCT

    Hi,
    For default values, you can default only certain field. For example for Company Code you can maintain the parameter BUK value in your user master in SU3 transaction. (You can find the parameter name in the technical discription (F1> Technical Data) of that field.)
    For excccel, if the output is in ALV format, then in ALV toolbar, there is a button "Speadsheet" available. You can use that.
    However the data updation in excel is not actually updated in database table (Except for certain planning tools given in SAP.)
    Regards,
    SDNer

  • How to set default date value to a field on screen

    How to set default date value to a field on screen and allow users to modify it ....

    Hello,
    In the PAI module, you need to save the changes to the database using the command MODIFY.
    Follow an example:
    Create or change a message in database table T100. If there is no message with the number 100 in the MYMSGCLASS message class in English, it will be created. Otherwise only the text is changed.
    DATA message_wa TYPE t100.
    message_wa-sprsl = 'EN'.
    message_wa-arbgb = 'MYMSGCLASS'.
    message_wa-msgnr =  '100'.
    message_wa-text =  'Some new message ...'.
    MODIFY t100 FROM message_wa.
    Regards.

  • Pass in values for form fields

    Is it possible to pass in values for form
    fields like an ticket id or something?

    Sorry, we currently do not support that.
    Randy

  • Month-to-Date and Year-to-Date values in Query

    Hello experts,
    One of our BI reports has the following requirement: the user should be asked for the report date. After the user inputs the date, the report shows the key figures in three different "flavors": one is the values for that date, the second one is the cumulate values from the first day of the month of the report date to the report date itself, and the third is the cumulate values from the first day of the year of the report date to the report date itself.
      I created my report date variable based on 0CALDAY. Then I searched for SAP-exit variables that would help me achieve this, but could not really find any, except for 0P_ABO10, 0P_ABO11, 0P_ABO12 variables, all of them have as description "Start of Key Date Year". I tried creating a few selections in which the dates taken were defined as a range from each of these variables to the report date variable (for the year-to-date values), but I got the error "Variable 0P_ABO10 could not be substituted". I also got this error for the other two variables. And I could not find any SAP-exit variables like "Start of Key Date Month", in order to do the Month-to-Date part. My next try was to use the field "Key Date" with a variable in it, instead my own report date variable based on 0CALDAY, but it gave me the same errors.
    I searched the forums and found a few threads that looked useful, like
    First and Last day of month and
    1st day of month / 1st day of week variables
    However, they require some ABAP coding, and I do not know where to place the code (actually, I do not know where to work with ABAP code), and I also believe that I would have to do some changes to it.
    Any suggestions?

    Hi Pedro,
    You have to create customer exit in T_Code: CMOD
    1. Create a Z project
    2. Select RSR00001 as enhancement type.
    3. Go into include ZXRSRU01
    4. create a code like
    Here A is your variable based on 0calmonth with type customer exit and B is variable for 0calday.
    Try to write logic for your case taking this as example.
    WHEN 'A'.
        IF I_Step = 2.
          Loop at I_T_VAR_RANGE into L_T_VAR_RANGE where VNAM = 'B'.
            Concatenate L_T_VAR_RANGE-LOW(4) '001' into D1.
            Concatenate L_T_VAR_RANGE-LOW(4) '012' into D2.
            Clear L_S_Range.
            L_S_Range-low = D1.
            L_S_RANGE-high = D2.
            L_S_RANGE-sign = 'I'.
            L_S_RANGE-opt = 'BT'.
            Append L_S_Range to E_T_Range.
          ENDLOOP.
        ENDIF.
    If you want exact code I can help you in that.
    Thanks,
    Kams

  • How do I add a current date to a form field so that it will give me the current date each time it is opened?

    I have adobe 9 pro. I am currently adding fields to a document and would like my date field to display the current date when the document is opened so that the user does not have to enter the date each time. How do I do that?

    Have you searched for this issue. It has been answered many times.
    Example Acrobat JavaScripts
    Scroll down to the . Insert Today's Date into Form Field section.

  • Current date in a form field

    In Acrobat 7.0, I used a JavaScript to print the current date. However, I have been upgraded to Acrobat Professional 8.0 and the script does not update the date. It displays the creation date of the form.
    Any help would be appreciated.

    Is there any other action filling this field?
    Add the following to the calculation:
    console.show();
    console.clear();
    event.value = util.printd("mm/dd/yy", new Date());
    console.println("Today is: " + util.printd("mm/dd/yy", new Date()) );

  • Need to Change data in PDF form field with importData operation

    This should be simple, right?
    I have a PDF form that is submitted.  At a certain step in the process, I need to modify the value of one field from within the process.  I am using a PDF document in the default formData document variable.  To do this, I am using the exportData operation from the FormDataIntegration service to get XML.  I then use the setValue service to modify one node of the XML.  Finally, I use the importData operation from the FormDataIntegration service to import the modified data back into the PDF.
    Problem is that I am getting an error.  It says: ALC-FDI-001-304: Only XDP data is supported with XFA forms.
    Any advice?  Jasmin, Jayan, Paul, anyone?

    My theory is that when you export the data you do get xdp data.
    Now  when you modify the node you don't have the right xPath to that node and if that's the case, it might be overwriting the entire xml.
    This is causing the xml not to be in xdp data format and you get the error.
    Could you post the data you get from the exportData operation and then the xml you try to use by the importData?
    Jasmin

  • Data search in form fields inside a workflow

    Want to do a search on forms based on any / all fields defined in the form. Since the form is user defined and form field data may change as it passes through the workflow (and can be at any stage except completed), what will be a clean way to do the search? Please note that we may not have prior information about form fields (user is free to define any form/ field) and we want the solution to be a generic one. Is it possible in any version of LC including latest release?
    Thanks for your help.

    Hi Howard,
    Thank you for your reply.
    I shall remember not to cross post in future. Please excuse me for my ignorance.
    This is what I want to do:
    1. The client has defined workflow and form(s) (with business fields) and I do not have prior information of these fields.
    2. Users of the above mentioned workflow started workflows by submitting completed forms.
    3. These forms are at different stages of processing in the workflow (but not completed).
    4. The requirement is to find those forms that contain say "Susanta" in any field and list those forms with processing status.
    5. The search string could be any alphanumeric string, and the search is restricted on field values only. However the assumption is that the search need not know what are the fields in the form. The workflow and the form name are known.
    I'll appreciate further hint from your side. Thanks in advance.

  • Displaying Data in a Form field

    Hi,
    We have a requirement, where we have to display the value in one of the field as "Header_number.Line_number" where as the backend value will have only the Line_number. We have Header_number in a Materialized View. I am going to fetch line_number into an existing datablock and is based on a VIEW.
    Could anyone help me, how to do this, i'm working on forms 10g, and i'm a fresher in forms. Please suggest me, how we will achieve.
    Thanks in advance,
    Pavan Kumar

    Do you have datablock in your form that is based on the Materialize View (Header)? If so, this will save you a trip to the database to fetch the Header_Number. You simply need to add code to display the Header_Number and Line_Number in a non-base table item. I will guess that as you want this combined number to change as your users change Line records. That being the case, I would add a When-New-Record-Instance (WNRI) trigger on the LINE block to concatenate the two numbers in to a non-base table item. For example, create a Control Block and add a Character Item called disp_header_line and try the following:
    /* Sample WNRI trigger */
    /* This sample code assumes you have a block named HEADER and LINE. */
    /* Make sure you change the block names to match your form. */
    BEGIN
       :CONTROL.disp_header_line := :HEADER.Header_number||'.'||:LINE.Line_Number;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Adobe Reader 9.4  won't allow saving-copying-printing of data entered into form fields.

    Hello, all.  I own a fully automated Continuing Education website with a national customer base.  The release of Adobe Reader 9.4 has brought a major problem for us which we haven't been able to overcome, and it's a critical issue which will destroy our business if the problem continues. 
    The problem:  Our professionally licensed website users earn online, instantly downloadable Continuing Education certificates in PDF file format, which are auto-generated by our software program when the user has successfully completed a course and its quiz.
    Each certificate is a template created by Adobe Acrobat Pro 6 which contains the boilerplate course goals, credit hours earned for the course, plus all of our educational approval numbers needed to conduct business in each state.  THE PROBLEM HERE is that these generated certificates ALSO have form fields which are auto-completed by our system when the user successfully completes his or her course - i.e., the user's name, his license number, and the date and hour and minute of completion.  Until some of our customers began to use Adobe Reader 9.4 on their PC this past week, the certificate generation process has performed flawlessly - for over 3 years now, for over a thousand customers - the only exception being the  occasional MAC user who needs to download the correct version of Adobe Reader, and to use the correct browser. 
    Beginning last week, site users who have downloaded 9.4 can no longer SAVE their Continuing Education certificates to their computer with their name, license and date and time of completion showing on the certificate.   And they can't even print the certificate correctly - their name, license, and date of completion appear as blank lines.  They can't download or email the certificate with the critical form field data showing on the document. This is a devastating situation for our business and for the users - who certainly won't return, and are demanding refunds. 
    In fact, I (who installed 9.4 last week) discovered that I can't even download and save an intact copy of a customer's certificate from my own website, OR copy and paste information from a client's generated certificate in order to manually create a certificate for him or her.  The on-screen message tells me that I am not allowed to do this with this document .... despite the fact that I was the creator of the document. Needless to say, when I un-installed 9.4, I had none of these problems.
    Customers wouldn't have problems either if they uninstalled 9.4 - but you can't tell customers who call in to complain, to uninstall their Adobe Reader program and find something else.  They also have to use Adobe Reader to view over half of the courses we offer, and they need to be able to work with them effectively with no problems. 
    In the past, because of occasional Adobe Reader problems of a different sort, we could tell customers to use Foxit or Nitro PDF if they had Adobe issues.  But that was back in the day when there was no competition in running an online CE website.  Now there is plenty of competition, and customers will just go elsewhere before they will try to reconfigure their computer just to stay with our site.
    I will bet that hundreds (thousands?) of other online businesses who work with system-generated form fields in PDF documents have been similarly affected.   
    Is there a solution here?  Surely this was an UNINTENDED result of  Adobe's upgrade to 9.4.   Is there something that we can do at our end to eliminate these issues?  There are NO security protections or limitations imposed on these certificate documents.  And we CANNOT eliminate the form fields that are filled internally when the customer passes t the course.  Date and time of completion and all the rest are required by all of the States which license us.  Many thanks!

    That was it!
    Thanks

  • PDF- paex page data to pdf form fields

    Just want to find out if anybody can help me out with this -- without using BI Publisher:
    I have several pdf letters that are pdf fillable. What needs to be done is from an APEX page:
    1. user search for client id
    2. find and selects the client id. Hidden fields for this would be the client's fullname, address, citystatezip, workername, workerphone, workerlocation, workersupervisor, workersupervisorphone, clientid.
    3. select the letter category: CAT1, CAT2, CAT3, CAT4 . I have a letters_table in oracle and have a category field in there. Will create an LOV for this category as a radiobutton. User will select the letter category.
    4. Based on the letter category selected, a list of letters will appear or posted in the page.
    5. User will then select the letter or (letters) by checkbox from the report listing of letters.
    6. Letters in PDF template format will print with the hidden fields printed on them.
    Any idea how to do this? Already created a page for the user to search the client id. So steps 1 and 2 is done.
    Need ideas and help with the rest....
    Can you link the fields in a page into a PDF fillable form? The PDF forms reside in our intranet server.
    I do not have BI Publisher and the deadline for me for this project is Friday April 24.... so appreciate ideas!
    Thanks! ?:|

    There was/is a sample application for html-db 1.5/6 that was called mailmerge.. It allowed you to do a mailmerge document in WOrdpad with Oracle data.. The rtf file would be stored in a table in your schema and you would run code against it to look for filler characters that would be replaced with your data..
    It has limitations, you might want to go and download it and see what you think..
    http://htmldb.oracle.com/pls/otn/f?p=18326:44:338076716200094::::P44_ID:1682
    Thank you,
    Tony Miller
    Webster, TX

Maybe you are looking for