Lock Automatic Date Field after Submit

I have a form that generates the current date when the form is open.  Once the user complete the form I have a submit button that will flatten the file and submit the completed PDF. All this works great. 
The challenge I have is even though the form is flattened, when a user opens the flattened PDF in a PDF Reader the date displays the current date.  Is there a way to set this field to update only once when the form is initially opened?
I am currently using the following function to generate the date in the field.
var f = this.getField("OpenDate");
f.value = util.printd("yyyy/mm/dd", new Date());
I am running Adobe Acrobat X Pro.
Regards,
Robert

To test the form, you need to close the saved form and reopen it. Because the field is empty it should populate. If you save, close the form, and reopen the form the date should not change.
Note the PDF needs to be opened before a document level function will execute and it will only execute once.
If you want the form to work for others, it needs to be saved with  the date field empty because when the form is opened and the document level script runs it will only populate an empty date field and if the field has any non-null value in it the field will not update.
For testing you could change the script to include an alert to tell you if the date field is being updated or not.
A "flattened" PDF has no form fields.

Similar Messages

  • F4 Help on Date Field after ALV is generated

    Hi all,
    Now this might sound very simple question, but Im having some difficulty in this.
    My idea is to have an F4 on a date field after the ALV Grid report is executed. From the forum search, Ive got such answers as
    l_fieldcat-edit         = 'X'.
    l_fieldcat-F4AVAILABL = 'X'.
    Now the problem with this is that Im getting an error saying:
    The data object "l_fieldcat does not have a component called "F4AVAILABL".
    And then I tried this:
    l_fieldcat-fieldname    = 'DDATE'.
    l_fieldcat-ref_tabname = 'ZCST001'.
    Now at the report output when I press F4 on the date field it gives me a dump saying:
    Field symbol has not yet been assigned.
    Error in the ABAP Application Program
    The current ABAP program "CL_GUI_ALV_GRID===============CP" had to be terminated because it has come across a statement that unfortunately cannot be executed.
    So Im kinda stuck now. Appreciate your suggestions.
    PS: Im on ECC6.
    PPS:The intended F4 on field is a custom field in a custom table.
    pk

    Run This:
    report ztest.
    TYPE-POOLS : slis.
    tables:mara,makt.
    data: begin of it_final occurs 0,
    matnr like mara-matnr,
    ERSDA like mara-ERSDA,
    end of it_final.
    DATA: it_fieldcat     TYPE slis_t_fieldcat_alv,
          wa_fieldcat     TYPE slis_fieldcat_alv,
          wa_layout       TYPE slis_layout_alv,
          g_repid         TYPE sy-repid.
    START-OF-SELECTION.
    select matnr ERSDA into table it_final from mara up to 10 rows.
      g_repid = sy-repid.
      PERFORM f_populate_fieldcat.
    *  PERFORM fill_zpayroll.
      PERFORM f_call_alv.
    *&      Form  f_populate_fieldcat
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form f_populate_fieldcat .
    "Mat Number
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname     = it_final.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-seltext_l   = 'MAT No.'.
      wa_fieldcat-outputlen   = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      "Creation date
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname     = it_final.
      wa_fieldcat-fieldname   = 'ERSDA'.
      wa_fieldcat-edit         = 'X'.
    wa_fieldcat-REF_TABname = 'MARA'.
    wa_fieldcat-REF_FIELDname = 'ERSDA'.
      wa_fieldcat-seltext_l   = 'Creation date '.
      wa_fieldcat-outputlen   = 15.
      APPEND wa_fieldcat TO it_fieldcat.
    endform.                    " f_populate_fieldcat
    *&      Form  f_call_alv
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form f_call_alv .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = g_repid
          i_callback_top_of_page = 'TOP-OF-PAGE'
          is_layout              = wa_layout
          it_fieldcat            = it_fieldcat[]
          I_SAVE = 'A'
        TABLES
          t_outtab               = it_final
        EXCEPTIONS
          program_error          = 1
          OTHERS                 = 2.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
    endform.                    " f_call_alv
    In custom table date field must be referenced to DATS.
    P.S.I hope you already solved
    Cheers

  • CR XI uses the wrong data field after save/close-open

    I have a quite complex CR XI report (35 sections).  It has 2 embedded sub-reports, connects via ODBC to Sybase, and uses a long and complex SQL statement as a Database Command.  After a fairly small number of edits and saves (I guess between 10 and 20), I can no longer save it correctly.  For example, if I add a particular text field from the command to be displayed.  Run the report in the designer then all is well.  But if I save the report and re-open it then the data field that I added has been replaced by another, totally different field.  This process is repeatable!
    I tried removing some unneeded fields from the Command SQL and that causes a DIFFERENT field to replace the one I select.
    If I re-create the entire report from scratch (copy and paste from the u201Cbadu201D one) then the problem goes away for a few edits and saves; but then returns.
    This is getting very frustrating, because it takes me the best part of a day to copy the report to a new one, including copying all of the formatting and formulae, and ensuring that every field and every section has the correct properties (suppress, new page etc) applied to it.  In order to minimise the risk of it becoming corrupt I u201Csaveu201D infrequently, which can add to the frustration when things go wrong!
    Has anyone got ANY ideas? 
    What can I do to prevent the corruptions?
    Is there a better way to clone the report?
    Does anyone know if CR 2008 would be any better?

    Don,
    Thanks again for your help.  I think that you are misunderstanding the problem a bit.  When I have the report open in the designer I can put the correct field on the designer surface (eg by dragging a field called u201CCustomerNameu201D from the Command in the u201CField Exploreru201D to an appropriate location).  The report then functions perfectly when I refresh (F5) and view it in the u201CPreviewu201D tab, and I see the appropriate names.  However If I close the designer and then re-open it, a DIFFERENT field, u201CCustomerBalanceu201D, is displayed both in the design view and the preview tab, and of course I see the numeric data for that incorrect field in the preview, where I expect to see a name.  The same (incorrect) data is shown when the report is run and displayed via the web browser interface (not within the CR designer).
    I have run and edited the same report on different PCs with the latest CR XI installed and on my PC with many different loads (eg just after re-boot and later in the day with many applications running) all with identical results, so I am confident that it is not resource related.
    Similarly I donu2019t think it can be ODBC related, because it appears to occur when the report is saved, closed or opened.  I am not saving data with the report.  I have now tried using the DataDirect driver, but it will not connect to the Sybase ASA database on a remote server, because it complains that procedure sp_server_info is not found.  This is only supported by Sybase ASE (not ASA).
    There are a lot of conditional fields and sections and page breaks  within the report, these are suppressed with an appropriate formula, but the underlying SQL is just passed one parameter and this is used to select an appropriate single data set (there is no hierarchical grouping or drill-down in this report).  The error is there consistently whatever parameter value is used (i.e. it always displays a value in place of a name in the example above).
    I have still not tried your stored procedure idea, partly because that will require another day to re-write the report.  I might combine that with Jasonu2019s idea and make all display all data via formulae as a first step and then replace the underlying data with a stored procedure.
    I have discovered a temporary work-around though.  I have added more sub-reports (all take the same parameter value) and replaced whole sections with those sub reports, so I was able to remove quite a few data fields from the main SQL query, because these are now queried separately in the sub-reports.  Itu2019s all working at the moment!
         Jonathan

  • Newbie - Adobe 7 Prof - How do you automatically clear fields after filling out form and printing

    A form housed in a database displayed on the web, allows the user to open, fill out some information and then print using the "Print button". How can I have the form automatically reset the fields to blank after the form is no longer being viewed on the screen or even after printing? If user goes back to the same form later without rebooting or cacheing, the information that was entered is still there. I'm new to this and have very little scripting experience. Your help would be VERY appreciated.

    I've read the article at the website provided. Can you provide specifics on what to add where. I'm working in Adobe Designer 7.0...are the changes to be made there or in the Adobe Prof 7.0 for the Client?

  • Prob in accessing DataSourece value from netui-data:repeater after submit

    HI all,
              I am new to this WLWS. PLease guide me in the following scenario:
              I am retrieving an array of records (activityDetails[]) from a Db control and setting this to the datasource property of a netui-data:repeater. Basically I am populating a list of records in my jsp page which works fine.
              But When a submit the page, I am not able to access that array of records from the action method difined in my controller.jpf file, even though I have declared the array in the Form bean.
              And I am not sure if have set the proper datasource for the checkBox defined within the records. The purpose of this checkbox is to select the records form the list to be saved in the database. Is there any better way of achieving the same.
              It's throwing Null pointer exception in the method called
              doProcess.
              Here is the related code:
              activities.jsp
              <netui:button type="submit" tagId="btnSave" value="Save" styleClass="btn" action="doProcess"/>
              <netui:button tagId="btnPrint" value="Print" styleClass="btn" onClick="doPrint()"/>
                                       </td>
                                  </tr>
              <netui-data:repeater dataSource="{actionForm.activityDetails}" >
              <netui-data:getData resultId="pkg" value="{container.item.pkg_header_id}" />
              <tr bordercolor="#A8A8A8" >
              <%
              if (pageContext.getAttribute("pkg") == null)
              %>
              <td><netui:content value=" "/></td>
              <%
              else
              %>
              <td><netui:checkBox dataSource="{container.item.activity_id}"/>
              <%
              %>
              <td><netui:content value="{container.item.prt_no}"/> </td>
              <td><netui:content value="{container.item.activity_num}"/> </td>
              <td><netui:content value="{container.item.frc_acct_code}"/> </td>
              <td><netui:content value="{container.item.frc_acct_code}"/> </td>
              <td><netui:content value="{container.item.status_code}"/> </td>
              <td><netui:content value="{container.item.location_code}"/> </td>
              <td><netui:content value="{container.item.task_code}"/> </td>
              <td><netui:content value=" "/> </td>
              <td><netui:content value="{container.item.wpid}"/> </td>
              <td><netui:content value="{container.item.original_qty}"/> </td>
              <td><netui:content value="{container.item.act_obj_hrs}"/> </td>
              <td><netui:content value="{container.item.act_actual_hrs}"/> </td>
              <td><netui:content value="{container.item.act_rmng_hrs}"/> </td>
              <td><netui:content value="{container.item.act_rmrk}"/> </td>
              </tr>
              </netui-data:repeater>
              </table>
              </netui:form>
              </netui-template:section>
              </netui-template:template>
              Here is the .jpf file
              public class VSchedController extends PageFlowController
              * @common:control
              private custom.ConstSched constSched;
              private ActivityDetails[] activityDetails;
              * @jpf:action
              * @jpf:forward name="index" path="index.jsp"
              * @jpf:forward name = "success" path = "packageActivities.jsp"
              protected Forward begin(PackageSchedForm form) throws SQLException
              HttpSession s = getRequest().getSession(false);
              int jobID = (s.getAttribute("JOB_ID") != null) ? Integer.parseInt(s.getAttribute("JOB_ID").toString()) : 0;
              if (jobID == 0) jobID = 6;
              setActivityDetails(constSched.getAllActivities(jobID));
              form.setActivityDetails(activityDetails);
              return new Forward("success");
              * @jpf:action
              * @jpf:forward name="success" path="packageActivities.jsp"
              protected Forward doProcess(PackageSchedForm form) throws SQLException
              System.out.println("----------------------------------------");
              System.out.println("ActivityDetails is null ? " + (form.activityDetails == null));
              for(int i=0; i < 6; i++)
              try
              System.out.println("Checked -> " + form.activityDetails.activity_id);
              catch(Exception e)
              System.out.println(i);
              System.out.println("----------------------------------------");
              return new Forward("success");
              public ActivityDetails[] getActivityDetails()
              return this.activityDetails;
              public void setActivityDetails(ActivityDetails[] activityDetails)
              this.activityDetails = activityDetails;
              * FormData get and set methods may be overwritten by the Form Bean editor.
              public static class PackageSchedForm extends FormData
              private ActivityDetails[] activityDetails;
              public ActivityDetails[] getActivityDetails()
              return this.activityDetails;
              public void setActivityDetails(ActivityDetails[] activityDetails)
              this.activityDetails = activityDetails;

    Personally, I have had a hard time doing what you are asking for using netui tags. I have had the same case, and asked the person in my team to just return a collection of value objects and then iterate through it without the repeater tag. To use the checkbox, I have had to use a String[].
              Kunal

  • Lock Purchase Order fields after goods receipt

    Hello everyone,
      I need to be able to set a couple of fields in ME22N as display only after goods receipt has been done for the PO. Is there any config that I can do to get this done? Any idea or suggestion?
      Thank you very much for your help!
    Kelly.

    You can change PO after GR in standard SAP and there is no standard customization feature available to block that.
    Use ABAP to check for GR against the PO and block PO fields once GR is posted.
    Use tables MKPF for GR posting, EKKO and EKPO for Purchase Order.
    ABAP will have to change the field status of Purcahse Order screens as blocked, if GR is posted.
    It might be added as a subroutine that gets triggered after each GR posting.

  • Locking a field after digitally signed

    I am working on a monthly document. When the user selects a value from a dropdown field, there is a signature box below it. Is there a way to lock that dropdown field after the corresponding signature box is digitally signed?

    The user can choose to lock the entire document (if it's the last signature), or you can set up the signature field so that other fields are locked by making them read-only when it is signed. See the Signed tab or the digital signature field's Properties dialog to see where you can do this.

  • Error in validation of Date Field

    Hi Experts,
    For my date field i assigned validation and is working properly.I could pop up the error message also.But my issue is, the entered wrong data is not getting deleted or cleared from the date field after validation.
    How i can clear the wrong data entered in field automatically?
    Please help me.
    Regards,
    Arun.

    Hello Arun,
    Can we use validate event for the same? Ideally it should cancel teh submit of the form.
    I am a using SAP Adobe Interactive forms using transaction SFP in ABAP Workbench and am trying to check the possible ways to apply validations (client side validations) to the form data. These forms are expected to get called from HCM Processes and Forms processes.
    Regards
    Rajeev

  • How to get a noneditable date field...

    Hi,
    The date item in HTMLDB provides a calendar alright, but the actual column is still open to the users to change the date chosen from the calendar, how do u make it a disabled field so that users cannot change the format of date chosen from the calendar just like a popup lov,displays description returns key value type....
    or do we have to set some attibute to make this field disabled...
    Thanks in advance
    Regards
    Naveen

    Hi Naveen,
    I'm not sure that you can lock or disable the date field, after all you want your user to enter one. But I think that you can use a validation on the item - Item specified is a valid date. Your users will get an error message each time they will try to enter invalid date, including wrong date format.
    Hope it helps,
    Arie.

  • How to set date +120 daye to one date field

    Hi,
    I have 2 fields one is Close date(Item style is Message Layout) and Quote Valid Until(Item Style is Date Field).After opening the page Close date will come automatically. Now My requirement is need to put Close date+120 days to Quote Valid unti field. Pls let me how to do this one and pls provide Sample code....
    Thanks in advance,
    Hanimi....

    Hanimi,
    Use Below Code
    //Convert the fetched date to calendar date and use the below method.
    import java.util.Calendar;
    public class CalendarAddExample {
        public static void main(String[] args) {
            Calendar cal = Calendar.getInstance();
            System.out.println("Today : " + cal.getTime());
            // Subtract 30 days from the calendar
            cal.add(Calendar.DATE, -30);
            System.out.println("30 days ago: " + cal.getTime());
    }Regards,
    Gyan

  • How to set cursor after submit via selection-screen

    hi guys,
    i would like to set cursor to certain field, after submit via selection-screen.
    eg.
    SUBMIT   z_mm_kbr_gr_label_01
                VIA SELECTION-SCREEN
                WITH p_mblnr = p_mblnr
                WITH p_zeile = p_zeile
                WITH p_gjahr = p_gjahr
                WITH p_ccode = p_ccode
                WITH p_dcode = p_dcode
                WITH p_crt = p_crt
                WITH p_print = p_print.
    i want to set cursor field 'p_ccode' after going back to
    z_mm_kbr_gr_label_01. the program always go to the first field on the screen whatever i do.
    may i know how to do this?
    thanks.

    Hi,
    Please try like below .
    at selection-screen output.
    SET CURSOR FIELD  'P_CCODE' .

  • Beginner User:  Locking (making read only after data entry) a single field after selecting date

    Hello, I am a beginner user trying to create a form using Adobe Livecycle.  One of the fields I would like to make read only/protect it/password protect it after a user selects the date.   For example, I select August 17, 2010 as the date. After I select it, I would like that field to be read only or protected so that another user can not edit it. 
    I am a complete novice using XML or codes.  I'm learning alot from these boards though.    I know its probably simple.
    Any help is appreciated.

    The attached locks a text field if the date chosen is "08-17-2010". If it is not the text field is accessible.
    // form1.page1.date::exit - (JavaScript, client)
    if (this.rawValue == "2010-08-17") {
      form1.page1.tf.access = "protected";
    else {
      form1.page1.tf.access = "";
    Steve

  • Lock PDF Fields upon Submit?

    Hi,
    I am using Acrobat Pro 9. I created a fillable PDF with a submit button at the bottom. I plan to e-mail the PDF as an attachment and set it up so that the fdf file is returned to my e-mail. However, upon testing the result i noticed the fields did not lock after the user clicks submit. In other words, when I open the returned file / import the fdf data it allows me to change/edit the user imputed data. This could cause problems for me since others will be working with the returned data. Therefore, I would like to know if there is a way to lock the form fields once the user clicks the submit button. When the data is returned I do not want there to be a way for me (or any one else using the data) to accidentally change it. Please let me know if there is a way to do this.
    PS I am new to acrobat and have no real design or development experience. I do not know much, if any, terminology. Thus, if responding please respond as if you were talking to someone who knows almost nothing. It would be helpful if you could explain step-by-step using acrobat 9 pro.
    Thanks,
    Josh

    If you really want to make sure that edits to entry fields cannot be changed, you can flatten the PDF pages:
    this.flattenPages()
    All values entered into text fields will now be text in the PDF, not editable fields. This includes any buttons you have added, so you can hide them before you flatten the pages if you don't want them in the document:
    this.getField("btnFlatten").display = display.hidden
    this.flattenPages()
    You can also specify a page range to flatten. This will flatten pages 1 through 5:
    this.flattenPages(0, 4)

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • Livecycle Designer 8 - Is it possible to have button to clear fields after user has clicked submit by email button so user can reuse form to send another response with different answers?

    Users will use form to fill in stats for enquiries so they want to keep form open, complete a form, click button to submit by email, then click another button to clear form, form now ready to accept form's responses.  They dont' want to keep opening form each time form needs to be completed.
    Hope you help.
    Thanks Sandra

    Hi,
    Thanks for your response, not sure what you mean by a loop.  I put together
    a draft form to show staff in our Knowledge Centre the sort of thing
    Livecycle Designer can do.
    (See attached file: Library  Request  Form_pub_0001.pdf)
    They are currently writing out on form and manually putting into excel to
    keep stats on the requests.
    Due to current Global Financial Crisis my section does not want to spend
    extra money at the moment seeking assistance from our tech heads.  So we
    are looking for least work no expense option for keeping stats.  I am a PA
    who just happens to have Livecycle program on my computer.
    We use Lotus Notes so I thought the staff could save copy of Library
    request form in the stationery folder.  The staff using the form want to be
    able to do the following:
    1. open the Library request form at the beginning of the day;
    2. when a request comes in, complete the form and click on Send by email
    button
    3. click on a Clear Data button to clear all data from all fields so the
    form is open ready for when the next request comes in.
    Staff are time poor and, as this is only one of their numerous duties, they
    don't want to keep going to a location and opening a file which can be very
    slow on some days
    Each day form may be filled out by approximately 15 staff who may receive
    anything from 0 - 4 requests a day.
    I am not a tech head so script writing is a deep, dark mystery.  Can you
    help using the form above as an example for achieving step 3 above.
    Thanks,
    Sandra Smith
    Personal Assistant
    PricewaterhouseCoopers Australia
    Office: ++61 (2) 8266 9069
    Fax: ++61 (2) 8286 9069
    [email protected]
    http://www.pwc.com/au
                                                                                    Kacyndra                                                 
                 <[email protected]                                        
                 >                                                          To
                                           Sandra K Smith/AU/TLS/PwC@AsiaPac
                 08/08/2009 12:25                                           cc
                 AM                                                                               
    Subject
                                           Livecycle 
                 Please respond to         Designer 8 - Is it possible to have
                 clearspace-200985         button to clear fields after user
                 0098-481178-2-216         has clicked submit by email button
                 [email protected].         so user can reuse form to send 
                     adobe.com             another response with different
                                           answers?                                                                               
    if i understand this correctly, you just want everything cleared whena
    buttons is pressed?
    you can either do it individually:
    on button click:
    mytextField.rawData=""
    or do a loop, using child/paretns..

Maybe you are looking for

  • Stability of Removable Media support in Linux?

    Hey all, I'd previously thought support for removable media in linux was very good, and everthing I've used has been detected and mounted correctly and such, however I have experienced some corruption on them, especially on my microSD, as I've recent

  • Creating user in oracle 12i

    Hi everybody, Where can I find information about creating users in oracle e business suite 12(12i)? Though I know how to do such procedure but I am thinking of a thorough mannual to integrate what I know about this matter. All the best,

  • IPod permanently frozen at Apple logo

    I have 1st generation 10GB scrollwheel iPod bought in 2003. It has performed like a champ until recently. Since I ran the last update, I had trouble with syncing and it started to freeze up sometimes. Now my iPod has totally crashed and burned. It is

  • F110 clearing

    Hi, I have some vendors of which master data have a customer number and for these vendors customer clearing is acitve. In the F110 prorposal display I need to see the vendor account and customer account balances separately in the first screen without

  • Memory leaks during child window close

    Hi All,    We have a tool that generates code for WPF application. In one of the applications WPF main window displays a child window in the form of a tab. The main window here can hold multiple child windows. I did a small test. I opened main window