Clearing fields

Hello,
I have some fields set up with error messages. for example in a date field, if the user enters a date in the future and tabs out of the field, an error message appears indicating that the date cannot be in the future.
The problem with this form is that it is not going to be a submittable form. They will just print it out and mail/fax/email it in. Therefore when the error message appears I would like the field to clear but I cant figure out how to do that. I am assuming I need to put something in the exit event, but I am unsure what code I should be using.
Is there anyone that is able to help?
Thank you in advance!
Nik

Hi,
as I don't know how you currently check your date values, I'm just guessing.
Here's the way I would do with a FormCalc script in the exit event of a date field.
if (Date2Num($.formattedValue, "MM/MM/YYYY") > date()) then
          $host.messageBox("Date connot be in the future")
          $ = ""
endif

Similar Messages

  • How to clear fields used in SAP SCRIPT

    hi all,
       i want to clear all fields which i have printed on my sap script.
    i have passed the values to these  fields by useing function module
    'TEXT_SYMBOL_SETVALUE' in se38 abap program.
    i have also used clear statement in my abap program to clear those fields but it cant working. is there any statement in SAPSCRIPT to clear fields.
    if so then please give me its an urgent. 
    thanks in advance.
    Vinod.

    hey,
    I understand that in a text-symbol when u set the values once, then u print them. for the second time when u want to print with diff values, then it will automatically get refreshed when u open it again.
    So use code like this.
    PERFORM OPEN_FORM USING FORMNAME.
    PERFORM WRITE_FORM USING TEXT_SYM.
    PERFORM CLOSE_FORM
    for the next run...
    at this instant all the text elements will get refreshed.
    PERFORM OPEN_FORM USING FORMNAME.
    PERFORM WRITE_FORM USING TEXT_SYM.
    PERFORM CLOSE_FORM
    Cheers,
    Sam

  • 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..

  • Button displayed among this region's items clears fields

    I've created a Button displayed among this region's items clears fields that's in the middle of my form, set to Submit Before...
    When click the button, it submits and the field items above the button clear off the form.
    I don't need it to submit, I just need it to make three fields appear on the form if needed, hence the use of the button.
    Thanks in advance!

    Hi,
    userRRRYB wrote:
    The user is cataloging documents. On the form she enters document number, title, owner, and document type (Work Instruction, Verification Sheet, Pallet Layout, etc.) If the document type is a Product Label, there are three more fields that need to be populated. Because the Product Label is one of over ten types and it's the only type that requires these extra fields, I got the bright idea to create a button that, when clicked, displays the fields.
    The problem is that the button is 'among the region's items' and submits when clicked (Request = Go) so it submits and clears the fields that have been populated prior to the fields in question.Assuming you are on Apex 4.0+ Instead of using buttons to display 3 extra fields when document type is product label use dynamic action to hide and show items, Here is how you create it
    1) Create standard dynamic action
    2) Selection type (item) -> item(s) -> :PXX_DOCUMENT_TYPE -> Value (20) Assuming you have created select list for document type field
    3) Specify true action -> show -> item(s) (select the three items you want to display) -> create false action (checked)
    By using DA your field values will not clear out.If you are on 3.0 you can do this with javaScript.
    It would be easier to help you out if you provide APEX version or recreate your problem on apex.oracle.com
    Regards,
    -Senthil

  • How to Clear Fields of a Screen, included in Chain..EndChain

    Dear All,
    I have developed a screen program with a few text fields. I have also used Chain..EndChain on these. I am unable to clear the fields included in this Chain..EndChain on the screen, while others are getting cleared.
    Please suggest a solution.
    Regards,
    Alok.

    Hullo,
    you probably have the module with clear statement before the CHAIN - ENDCHAIN command.
    The problem is that the FIELD command which you are probably using within the chain is waiting with the data transport of those fields until the FIELD statement has been processed.
    An example (with a Screen using KNA1 fields).
    PROCESS AFTER INPUT.
    * Directly after the PAI has been triggered all data from the screen elements
    * will be transported to the KNA1 variable in your program.
    * Except for those sceen element that are part of a FIELD statement.
    MODULE clear_kna1.
    * This module will clear the kna1 variable in your program.
    CHAIN.
      FIELD kna1-kunnr.
    * At this field statement the contents of the screen element kna1-kunnr
    * will now be transported to the kna1 variable ni your program.
      Module xxx.
    ENDCHAIN.
    In this example the kna1 variable will be cleared by the 'clear_kna1' module. However, since the FIELD statement is processed after this module, the kunnr field will be transported into the (now empty) kna1 variable.
    The solution to this is to put the ' clear_kna1' module after the FIELD statement (most likely after the chain). That way all the fields of the kna1 variable will be cleared.
    Hope this helps.

  • Clear fields when PDF page is spawned?

    Hi all,
    I have a fillable PDF  form that has buttons at the top of every page for the user to  duplicate the page in case more information needs to be entered.  Here  is the javascript I'm using, courtesy of George Johnson:
    // Get a template object from an existing template
    var t = getTemplate("myTemplate");
    // Spawn the template on the page following this one, and rename the fields
    t.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});
    This  works great, except when the user has already filled out page 1, then  clicks the button to duplicate the page, the new page contains the  information already filled in by the user on page 1.  Is there a way to  clear the fields when the page is duplicated? I am using Adobe X Pro.   Thank you!!!

    Update: I found this code:
    var iPage = 0; // This is your page number, it is 0-based, so page 1 is 0
    var sFields = new Array();// array of fields names that are found
    for(var x=0;x<numFields;x++)
    {var pg = getField(getNthFieldName(x)).page;if((typeof pg == 'number' && pg == iPage) || (typeof pg != 'number' && pg.indexOf(iPage) > -1))sFields[sFields.length] = getNthFieldName(x);}
    if(sFields.length > 0)resetForm(sFields);
    This code does work, but instead of blanking out the NEW page, it blanks out the original one. Preferably, the original page would retain the information and the new form would be cleared.  I changed var iPage = 0 to var iPage = pageNum +1 and that seems to blank out the spawned page.  Even when I press the button on the spawned page, the second spawned page is cleared.
    I know very little about javascript so if anyone sees any problems with this code or the change I made, I'd appreciate if you give me a shout.  Otherwise I guess I resolved this on my own. Thanks!

  • Clearing fields when calling new page

    I am using a list to call a target page. How can I clear out certain fields when the page is called (ie. reset them to their default value)? If I clear the cache for the page, it clears everything.

    Bob - You first said you wanted to clear out certain values, suggesting that this should take place when a list item link invokes the page and that clearing the cache for the entire page is inadequate because it clears more items than you want cleared. But in that same statement you suggested that you don't want to clear anything out, you want to set specific items to specific values, so I don't see how resetting the entire page is inadequate for the reason you cited. I think it is inadequate becase it clears cache for items when what you want to do is set items to specific values. In your last post, you asked if there is a way to reset all the items to their default value without mentioning the "list item target" situation. So, if the requirement is to set specific items on a page to specific values no matter how the page is invoked, I would recommend using page computations to achieve that. If you want to do this only when the page is invoked by certain URLs, I would suggest passing in an item value that can be checked by the page computations to determine whether or not to set the values.
    Scott

  • How to clear fields?

    Hi,
    I have a form in which there is one item with list item. Whenever I change the list item, I want the fields dependent on this list item to "clear". How can I do this?
    Kindly guide me.

    Hi,
    My blunt intelegence says, you can use 'WHEN-LIST-CHANGED' tigger and write PL/SQL to clear the fields because machine can't detect dependent fields as per your functionality.

  • Select list with redirect - clearing field issue

    I'created an APEX page where there is 2 items. A Select list with redirect and a Text Field. Both have "Only when current value in session state is null" for "Source used". If some data has been written into the Text Field and I'm selecting someting from the Select List with redirect, the value of the Text Field is cleared.
    The page has no Computations, Validations, Processes or Branches.
    As you may guess, I want the the Text Field NOT be cleared.
    I know, that subject has been discussed over and over, but I'm all reading about it told me that "Source used" set to "Only when..." for the Text Field, it's suppose tol keep it's value.
    Could please someone explain me what I've not understood.
    Many thanks in advance.

    Thanks for helping me. In fact, my real problem is about a page where two select lists are needed. The first one shows CATEGORIES and the second one shows SUB-CATEGORIES, based on the value selected at the first select list. Since there is other fields on the page and the data has not been saved yet (other fields afterwards and validations anyway), data entered has to be kept until the user click "Save" button and all the validations are ok. I was expecting to solve the issue by using "Select list with redirect" for CATEGORIES (this is the only way I was able to make SUB-CATEGORIES works) and having all my fields "Source used" set to "Only when...".
    So, can someone told me if "Select list with redirect" is the way to solve my problem or should I use something else?

  • InputFile clear field

    Having trouble clearing the field value of my inputFile field after a file has been uploaded and submitted.
    I tried using
    if1.resetValue()
    Which did not work
    and also tried Reset.utils(if1);
    <af:inputFile label="CAPTURE"
                                binding="#{backingBeanScope.backing_Test.if1}"
                                id="if1"
                                value="#{backingBeanScope.backing_Test.file}"
                                required="false" showRequired="false"
                                valueChangeListener="#{backingBeanScope.backing_Test.uploadFileValueChangeEvent}"/>
    Pic of field not clearing:

    In your case I think the value is stored in the backing Bean on an variable file , as per
    value="#{backingBeanScope.backing_Test.file}"
    So set the variable file to null in your backing_Test Bean.
    Cheers
    AJ

  • Clearing field data for new line item in me51n PR Creation

    hello everyone!!
    As you can see from the below picture, i have created some custom fields which are to be fillup during PR creation. now when user trying to create a second line item under a PR then those custom fields are holding previous value. But it should be blank.
    please help.
    best regards.

    Please uncomment this:
    ORDER_ITEM_INX-target_qty = 'X'.
    You can check the 2nd example in this link for your reference.
    http://sap4.com/wiki/index.php?title=BAPI_SALESORDER_CHANGE
    Regards,
    Naimesh Patel

  • How to use clear field options?

    I am having trouble figuring out what to do with this else statement error.........I can't seem to see where I am going wrong...............can anyone help?
    Program Name:     Transfer
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Transfer extends Frame implements ActionListener
    DataOutputStream output;
    //Construct components
    Panel dataFields = new Panel();
    Panel firstRow = new Panel();
    Panel secondRow = new Panel();
    Panel thirdRow = new Panel();
    Panel fourthRow = new Panel();
    Panel buttonArea = new Panel();
    Button submit = new Button("Submit");
    Button exit = new Button("Exit");
    Label firstNameLabel = new Label("Name:");
    TextField firstName = new TextField(15);
    Label studentIdLabel = new Label("Student ID:");
    TextField studentId = new TextField(15);
    Label transferCourseLabel = new Label("Transfer Course Number:");
    TextField transferCourse = new TextField (15);
    Label localCourseLabel = new Label("Local Course Number:");
    TextField localCourses = new TextField (15);
    public static void main(String args[])
    Transfer window = new Transfer();
    window.setTitle("Transfer Course Substitutions");
    window.setSize(450, 250);
    window.setVisible(true);
    public Transfer()
    //set backgound and layout managers
    setBackground(Color.magenta);
    setLayout(new BorderLayout());
    dataFields.setLayout(new GridLayout(4,2));
    FlowLayout rowSetup = new FlowLayout(FlowLayout.LEFT,4,2);
    firstRow.setLayout(rowSetup);
    secondRow.setLayout(rowSetup);
    thirdRow.setLayout(rowSetup);
    fourthRow.setLayout(rowSetup);
    buttonArea.setLayout(new FlowLayout());
    //Add fields to rows
    firstRow.add(firstNameLabel);
    secondRow.add(studentIdLabel);
    thirdRow.add(transferCourseLabel);
    fourthRow.add(localCourseLabel);
    //Add rows to panel
    dataFields.add(firstRow);
    dataFields.add(secondRow);
    dataFields.add(thirdRow);
    dataFields.add(fourthRow);
    //Add buttons to panel
    buttonArea.add(submit);
    buttonArea.add(exit);
    //Add panels to frame
    add(dataFields, BorderLayout.NORTH);
    add(buttonArea, BorderLayout.SOUTH);
    //Add functionality to buttons
    submit.addActionListener(this);
    exit.addActionListener(this);
    // output states
    try
    output = new DataOuputStream(new FileOUtputStream("Transfer.dat"));
    catch(IOException ex)
    System.exit(1);
    //construct window listener
    addWindowListener(
    new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = e.getActionCommand();
    if (arg == "Submit")
    try
    output.writeUTF(code);
    output.writeUTF(firstName.getText());
    output.writeUTF(studentId.getText());
    output.writeUTF(transferCourse.getText());
    output.writeUTF(localCourse.getText());
    catch(IOException ex)
    System.exit(1);
    clearFields();
    else //code to execute if the user clicks Exit
    try
    output.close();
    catch(IOException c)
    System.exit(1);
    System.exit(0);
    public void clearFields()
    firstName.setText("");
    studentId.setText("");
    transferCourse.setText("");
    localCourse.setText("");
    firstName.requestFocus();

    This is the actual error I am getting.........................now that I look at it, it is with the else statement but I am still having trouble fixing it.........
    ***********************************ERROR***********************
    A:\>javac Transfer.java
    Transfer.java:143: Type expected.
    else //code to execute if the user clicks Exit
    ^
    1 error
    *********************************************************this is the program below********************
    Program Name:     Transfer
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Transfer extends Frame implements ActionListener
    DataOutputStream output;
    //Construct components
    Panel dataFields = new Panel();
    Panel firstRow = new Panel();
    Panel secondRow = new Panel();
    Panel thirdRow = new Panel();
    Panel fourthRow = new Panel();
    Panel buttonArea = new Panel();
    Button submit = new Button("Submit");
    Button exit = new Button("Exit");
    Label firstNameLabel = new Label("Name:");
    TextField firstName = new TextField(15);
    Label studentIdLabel = new Label("Student ID:");
    TextField studentId = new TextField(15);
    Label transferCourseLabel = new Label("Transfer Course Number:");
    TextField transferCourse = new TextField (15);
    Label localCourseLabel = new Label("Local Course Number:");
    TextField localCourses = new TextField (15);
    public static void main(String args[])
    Transfer window = new Transfer();
    window.setTitle("Transfer Course Substitutions");
    window.setSize(450, 250);
    window.setVisible(true);
    public Transfer()
    //set backgound and layout managers
    setBackground(Color.magenta);
    setLayout(new BorderLayout());
    dataFields.setLayout(new GridLayout(4,2));
    FlowLayout rowSetup = new FlowLayout(FlowLayout.LEFT,4,2);
    firstRow.setLayout(rowSetup);
    secondRow.setLayout(rowSetup);
    thirdRow.setLayout(rowSetup);
    fourthRow.setLayout(rowSetup);
    buttonArea.setLayout(new FlowLayout());
    //Add fields to rows
    firstRow.add(firstNameLabel);
    secondRow.add(studentIdLabel);
    thirdRow.add(transferCourseLabel);
    fourthRow.add(localCourseLabel);
    //Add rows to panel
    dataFields.add(firstRow);
    dataFields.add(secondRow);
    dataFields.add(thirdRow);
    dataFields.add(fourthRow);
    //Add buttons to panel
    buttonArea.add(submit);
    buttonArea.add(exit);
    //Add panels to frame
    add(dataFields, BorderLayout.NORTH);
    add(buttonArea, BorderLayout.SOUTH);
    //Add functionality to buttons
    submit.addActionListener(this);
    exit.addActionListener(this);
    // output states
    try
    output = new DataOuputStream(new FileOUtputStream("Transfer.dat"));
    catch(IOException ex)
    System.exit(1);
    //construct window listener
    addWindowListener(
    new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = e.getActionCommand();
    if (arg == "Submit")
    try
    output.writeUTF(code);
    output.writeUTF(firstName.getText());
    output.writeUTF(studentId.getText());
    output.writeUTF(transferCourse.getText());
    output.writeUTF(localCourse.getText());
    catch(IOException ex)
    System.exit(1);
    clearFields();
    else //code to execute if the user clicks Exit
    try
    output.close();
    catch(IOException c)
    System.exit(1);
    System.exit(0);
    public void clearFields()
    firstName.setText("");
    studentId.setText("");
    transferCourse.setText("");
    localCourse.setText("");
    firstName.requestFocus();

  • CLEAR FIELDS

    HELLO!
    I HAVE A JFRAME WITH MANY JTEXTFIELDS AND I'D LIKE TO KNOW IF THERE IS AN AUTOMATIC WAY OF DELETING THEIR CONTENT OR SHOULD I DO:
    JTextField.setText("");
    FOR EACH OF THEM ???
    THANKS!!
    NILDA

    If all of you textfields are in the same top-level component (like a window or frame) then write a method which recursively enters each java.awt.Container object and examines its children. Look for javax.swing.text.JTextComponent instead of JTextField, that way if you have a JTextArea or other subclass, it will be covered as well. Each time you find one, call the setText("") method on it. This would be the easiest way to go, unless you have an explicit collection of all the fields already...

  • 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?

  • Clear Field

    How to clear the block filed if list item value is changed ?
    if :emp.vacation ='One Year' then
    clear_item(emp.tickets);
    Set_Item_Instance_Property('emp.tickets', current_record, Update_Allowed, Property_true);
    elsif
    :emp.vacation='Two Year' then
    clear_item(emp.tickets);
    clear_item(emp.tickets2);
    Set_Item_Instance_Property('emp.tickets2', current_record, Update_Allowed, Property_true);
    end if;
    if a value is change in any list item in the block how can i clear the block item? how can i do ? anyone help me in this regards plz?
    Regards
    Edited by: user10648713 on Jan 3, 2009 4:40 AM

    Clear_item takes the name of an item as Varchar-parameter, so you have to write:
    clear_item('emp.tickets');Easiest method to clear an item is:
    :EMP.TICKETS:=NULL;

Maybe you are looking for

  • Calling web service from forms..

    Forms Gurus, I am using this demo to call the webservice in Forms. http://www.oracle.com/technology/obe/obe_as_10g/deploy/callws_fromforms/forms_webservice.htm#r1 I am using a simple button to call get the conversion rate from the web service. But my

  • Setting Variables.....

    I have a problem in setting my PATH and SET CLASSPATH variables..... SET Path=%Path%;"C:\Program Files\Norton SystemWorks\Norton Ghost\;C:\j2sdk1.4.2_01\lib\tools.jar" PATH=%PATH%;"C:\Program Files\Mts;C:\j2sdk1.4.2_01\bin" is this correct? I'm using

  • View mp4 miles on ipad air

    How do you view mp4 files on ipad air.  I have the files in ITunes but how do I move them over to Ipad Air to view?  I think I'm syncing them but they aren't showing up on ipad air

  • How to put sound to a JButton.

    How can I add sound to a JButton if it isn't an applet. It is an application.

  • Drag on map to collect all coordinates

    Hi, As far as I know and after looking at the mapviewer library, I feel that there is no way to attach mouse drag event with mapview. Please correct me if I'm wrong and let me know if there is a way in updated version of mapviewer to attach mouse dra