How can I prevent the entry of a future date in my date field?

Hi,
I have a date field in my form (created w/ Adobe Lifecycle Designer v8.0) and I need to prevent users from entering a future date (current or past date is okay). Ideally, if a future date is entered, an error message pops up and tells the person that a future date is not acceptable. Does anyone know how to do this or have any suggestions to try?
Thanks,
Annie

hi Annie,
place the below code in the exit event of the date field and script language should be FormCalc
if 
($.rawValue <> null )
thenvar 
num = IsoDate2Num($.rawValue)-Date() 
if 
( num > 0 )
then
$host.messageBox("Invalid Date and cannot be Future Date")
$.rawValue= ""$host.setFocus("your field path")
endif
endif
Note : your field path for example your date field name is futuredate under subform name body then place body.futuredate.
if you want to resrict not to enter past date then compare num with < 0 or to current date then compare num with = 0.
Thanks,
Madhu.

Similar Messages

  • How can we  prevent the PO while creating the sales order

    Hi All,
    How can we prevent the PO number while creating sales order with existing PO. I have checked the box in sales document type as A but still im able to create sales order with same PO.
    Thanks in advance.
    Naveen

    Hi
    In VOV8 check the box
    Check Purchase Order Number
    The purpose of this field is to check for duplicate
    purchase order (PO) numbers during sales order entry. When you select A in
    this field, SAP gives a warning message during sales order creation if another sales
    document for same customer with the same PO number exists already. Leave this
    field blank if you do not want SAP to check for duplicate PO numbers.
    regards
    Prashanth

  • Have Operating System 10.6.8, Mail Program 4.6.  How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to m

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

    Have Operating System 10.6.8, Mail Program 4.6.
    How can I prevent the next email in the que from automatically opening after I act on the previous email ? It creates big organizational problems for me. My computer changes this mode from self opening to manually opening every few month with no ? action from me.
    Help

  • How can I prevent the flushing of the buffer until the playing is finished in AS3?

    How can I prevent the flushing of the buffer until the playing is finished in AS3?
    Is it possible?
    The buffer is emptied and flushed 10-11 seconds before the real end of the flv file.
    The file is locally saved and I stream it though crtmp server.
    I cannot seek the last 10 seconds because of empty buffer. How can I stop flash from flushing the buffer at end?

    i used the same code and i got it working correctly...
    thanx a lot fot it...
    now i have one more problem with it.
    Actually i created a new class 'ErrorDialog' and the function showErrorDialog() inside it.
    now i want the option YES_NO_OPTION and the function sayshowMsgDialog() returning int value indicating the option selected from the dialog box.
    I tried it with following code
    public
    static
    int
    confirmDialog( String message_in, Component parent_in, String title_in,
    int messageType_in )
    try
    JOptionPane pane = new JOptionPane( message_in, messageType_in,
    JOptionPane.YES_NO_OPTION );
    JDialog dialog = pane.createDialog( parent_in, title_in );
    dialog.setResizable( false );
    dialog.show();
    int optionType = -1;
    try
    optionType = ( ( Integer )( pane.getValue() ) ).intValue();
    catch( Exception ee )
    optionType = -1;
    dialog.dispose();
    return optionType;
    catch( Exception e )
    e.printStackTrace();
    but, since return is after dispose() it is throwing an error 'missing return value'
    can i get some kind of solution for this?
    waiting eagerly...........
    -Soni

  • How can you prevent the mac book pro from unexpectedly shutting off and beeping three times repeatedly?

    How can you prevent the mac book pro from unexpectedly shutting off and beeping three times repeatedly?

    The three beeps are an indication of a hardware problem. Power On Self-Test Beep Definition - Part 2 - Apple Support

  • How can I prevent the open/save file confirmation window popup ? Mine is currently set for "always do this action" but I still get the popup.

    Whenever I "export" a QIF file from my bank I get a File Action confirmation window popup. I have the correct application selected and I have it selected to "open" and "always do this action" but the popup always pops.
    I have checked the applications tab and the correct application is selected.
    How can I prevent the confirmation popup window please ?

    Cheers for the reply.
    I have deleted the rdf file but no difference. I still get the opening file box popup.
    From the resetting download actions link. Both lines in the about:config are missing.
    I have also tried switching the download option for the qif file to use a csr file but that also opens the confirmation box.
    I pulled this from the rdf file
    <RDF:Description RDF:about="urn:mimetype:handler:text/x-qif"
    NC:alwaysAsk="false"
    NC:saveToDisk="false"
    NC:useSystemDefault="false"
    NC:handleInternal="false">
    <NC:externalApplication RDF:resource="urn:mimetype:externalApplication:text/x-qif"/>
    <NC:possibleApplication RDF:resource="urn:handler:local:C:\Program Files\Microsoft Money\System\msmoney.exe"/>
    </RDF:Description>
    <RDF:Description RDF:about="urn:scheme:webcal"
    NC:value="webcal">
    <NC:handlerProp RDF:resource="urn:scheme:handler:webcal"/>
    </RDF:Description>
    <RDF:Description RDF:about="urn:mimetype:externalApplication:text/x-qif"
    NC:path="C:\Program Files\Microsoft Money\System\msmoney.exe"
    NC:prettyName="msmoney.exe" />
    Not sure if that helps.
    Thanks again for the reply

  • When inserting a checkbox, how can I prevent the note box from appearing?

    To all,
    After -reluctantly- "upgrading" from Acrobat Pro 7 to Pro X I find this new version absolutely maddening.
    Pro 7's features were easy to find in the tool bar. Now in Pro X everything is "dumbed down" with everything "nested" into each other...
    But I whine and digress from my problem:
    QUESTION:
    When inserting a checkbox, how can I prevent the note box from appearing?
    With every insertion of a checkbox onto a form, a "notebox" appears.
    Thank you,
    Matt

    As you can see, when I add a checkmark to a page/form, a "note" is automatically added also. In my old Acrobat v. 7, this did not happen.
    Any ideas on how I can set Acrobat Pro X to NOT include this note?
    Thank you,
    Matt

  • Please suggest how can we invoicing  the entry in the system against  purch

    Dear sap guru's,
                 Please suggest how can we invoicing  the entry in the system against  purchase order no- 4500133826 because it is a return purchase order.

    Hi SubhadipRoy,
    As Satish posted, the solution can achieve your goal. In addition, you can right click the Chart Series Labels and Series Label Properties, and then select Number in the left pane, finally select Scientific below the Category option. The data label may not
    overlay. Or you can enlarge the chart.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    When used as an Activex control in windows How can I prevent the "Q" logo from appearing between streaming videos?

    Hello Cgifford,
    Welcome to National Instruments Forums.
    To output your signal to the PFI lines,
    you can use external connectios between OUT0 and PFI lines. You can also use
    the backplane to do so by routing into the same RTSI line.
    1)
    On the SCOPE and FGEN, the name of the
    terminals are actually “PXI Trigger Line x/RTSIx” but on the 6602 you might
    need to route the signal using the property:
    You can also use the DAQmx route signal which perform the same opperation.
    2)
    This will depend on the frequency of
    your pulse train. If this is lower than about 10 ms, then you can probably
    place this on a loop and start and stop the acquisition every time. If the
    frequency is higher than this, you will have to use:
    -       Scripting on the FGEN side (read more)
    -       MultiRecord Fetch (more information in the scope help file
    section “Acquisition Functions Reading versus Fetching”).
    3)
    The short answer is yes. The longer one
    might depend on how tight you need the synchronization to be (us, ns, ps). For
    very tight synchronization, you should look into here.
    Message Edited by Yardov on 06-18-2007 03:14 PM
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    property.JPG ‏7 KB

  • I'm using "window.open()" to show one Calendar in a popup window. I can see that the popup is re-sizable. How can I prevent the user from re-sizing the popup?

    I'm using "window.open()" to show one Calendar in a popup window. I can see that the popup is re-sizable. How can I prevent the user from re-sizing the popup? I have tried "resizable=yes|no|1|0" and that seems to be not working.

    You can't prevent users from resizing a pop-up.
    *https://developer.mozilla.org/en-US/docs/Web/API/window.open

  • How can I prevent the settings on iMessage from changing each time I sync the devices with iTunes on our iMac?

    Each time I sync an apple device (iPad, iPad mini, iPhone) with iTunes on our iMac the settings on iMessage and phone settings change. We use the same Apple ID and have different e-mail addresses and phone numbers; however, each time a device is sync'd on iTunes on our iMac, the iMessage settings and phone settings are changed so that we all each get each other's text messages and phone calls. After the device is sync'd/charged, I have to go into each device (all of them somehow update when only one is sync'ing) and re-set the settings to what we want. How can I prevent settings from being changed each time?

    Okay I've tried safe mode.  Let it run down to 98%, plugged it in, locked the screen, and waited.  A few minutes later, the screen came on showing the 100% icon at the top right, full battery icon just to the left of the time, 100% text to the left of that.
    I'm not going to do a hard reset until I have confirmation that this is not normal behavior for the phone because that's going to take hours of my time and gigabytes of data transfer to get all of my media and apps back on the phone and configured.
    After all my griping, I do have to give credit where it's due.  This phone is much more efficient than my Galaxy Nexus.  I left the S5 running in WiFi hotspot mode while on battery last night.  It still had over 50% left on the battery.  The Galaxy Nexus would be stone dead after about 4 hours.  I can live with that if I have to but I'd really rather be able to leave it on the charger at night.

  • How can I limit the entry options to specific alphabet characters or the numbers 1 to 100 in a text field?

    I've written a script on the change event in Adobe Livecycle Designer ES4 on the change* event which is supposed to do the following:
    Allow the user to enter any of the following values, but only ONE option is to be entered:
    Any numeric value from 1 to 100 (the field is limited to 3 characters)
    OR
    the entry of the value "na"
    OR
    the entry of the value "r"
    OR
    the entry of the value "i"
    Here is the script:
    // Test input in real time. Only allow approved grades, i, i, na
    if (xfa.event.change!="" && !xfa.event.newText.match(/^[0-9]+?$|^(na?)?$|^(r)?$|^(i)?$/))  {
         xfa.event.change ="";
         xfa.host.messageBox("Oops, incorrect entry, Please correct your input. Thank you.");
    On the exit event I've set the script to automatically uppercase the characters. This works
    Two problems:
    1. I can't restrict the numbers to be between 1 and 100.
    2. I can't restrict the entry of "na". The field still accepts "n" which I don't want.
    Is there a way to correct these two issues?  Thanks!

    Thanks, I also posted it there. Actually, it took spending time on the JavaScript sites to eventually figure out the answer. Here is what works for me:
    On the change event:
    //Test input in real time. Only allow approved grades between 1 and 100, r, i, n
    if (xfa.this.change!="" && !xfa.event.newText.match(/^[1-9][0-9]?$|^100|^(n|r|i)$/)){
         xfa.event.change ="";    
         xfa.host.messageBox("Incorrect entry... Thanks!");

  • How can i prevent the error "mailbox locked by a pop 3 session"

    how do i prevent the repeated error " mailbox locked by a pop 3 session!"

    lol i think he was talking about formating your messages on the forum.
    look at an example that i just created hope it helps. If not then read up on the GUI chapter of your java book.
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JTextField;
    import java.awt.BorderLayout;
    public class ButtonTest{
        public static void main(String args []){
            JFrame frame = new JFrame();
            JPanel panel = new JPanel();
            final JTextField textA = new JTextField(10);
            final JTextField textB = new JTextField(10);
            JButton button = new JButton("Perform Action");
            class Listener implements ActionListener{
                public void actionPerformed(ActionEvent e){
                    if(!textA.getText().equals("") && !textB.getText().equals("")){
                        System.out.println(textA.getText()+" "+textB.getText());
           ActionListener listener = new Listener();
            button.addActionListener(listener);
            panel.add(textA);
            panel.add(textB);
            panel.add(button);
            frame.getContentPane().add(panel,BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.show();
    }

  • I synced firefox information to the servers and exchanged my laptop. How can I get the new laptop to sync with my firefox data?

    I want to get my firefox sync data on my laptop. However, I haven't paired this device, I just have my information on the firefox servers under my account. How can I get the sync info on this new laptop?

    If you don't have a 2nd device available which is already setup with your Sync account, pairing can't be done.
    In order to set up a '''new device''' when you can't "pair", you need three things; the user account name ''(email address used)'', the password for the account, and the '''Sync Key'''.
    If you didn't make a copy of the Sync Key as prompted at the end of the Sync set up process, you can't successfully setup a new device and won't be able to recover your data.

  • How can I prevent the S5's screen from coming on when charging completes?

    I got my S5 today and it seems to have a "feature" that will be very damaging to the OLED display.  When it's done charging, the screen comes on and stays on.  I've been going through all the settings I can find and don't see anything that will prevent this.  Since static images burn into OLED screens, this is the last thing I want.  It's done the same thing several times.  My old phone (Galaxy Nexus) didn't do this.  When the Nexus finished charging, it did so with no fanfare.  The screen stayed off.
    When the S5 is locked and the screen is off, there's no reason for the screen to come on for anything short of a phone call.  It certainly shouldn't come on and stay on just because the battery finished charging.  And, any time the display does come on without user input, it should turn off again automatically if it's idle for the length of the screen timeout.
    I've got "Smart stay" turned off and "Screen timeout" set to 1 minute but, after it self-activates, it stays on indefinitely.  I've let it go for 20 minutes and the screen is still on.  How can I fix this?  If I can't get this behavior to stop, it's going back to the store.  I'm not paying $600 plus tax to have my lock screen burned onto my phone because I charge it at night.

    Okay I've tried safe mode.  Let it run down to 98%, plugged it in, locked the screen, and waited.  A few minutes later, the screen came on showing the 100% icon at the top right, full battery icon just to the left of the time, 100% text to the left of that.
    I'm not going to do a hard reset until I have confirmation that this is not normal behavior for the phone because that's going to take hours of my time and gigabytes of data transfer to get all of my media and apps back on the phone and configured.
    After all my griping, I do have to give credit where it's due.  This phone is much more efficient than my Galaxy Nexus.  I left the S5 running in WiFi hotspot mode while on battery last night.  It still had over 50% left on the battery.  The Galaxy Nexus would be stone dead after about 4 hours.  I can live with that if I have to but I'd really rather be able to leave it on the charger at night.

Maybe you are looking for

  • Open Delivery is not considering in credit check in sale order

    Dear Experts, Please advice what setting is required for Dinamic credit check at the time Sale Order creation for Open Delivery & Open Billing Items should be considered at the time of new sale order creation, I have ticked on Dinamic check - "C" Ope

  • Receiver Mail adapter - mail package - mail not received

    Hi guys! I'm using receiver mail adapter and when I want to use Mail Package (subject is assign dinamically based on mapping) I do not receive the e-mail. When I switch to not using Mail Package, the mail is sent correctly.. In RWB everything seems t

  • Editing an existing old website?

    Can Dw edit an existing website. it is a 10+ year old website I think it was built with Dw. I have access to all of the web files. Can I download the html etc and edit the website? www.fencesupplyonline.com

  • Does the camera distortion correction filter in Elements 12 have automatic settings I can disable?

    I have found that the filter makes automatic changes to images.   For example, if I correct a vignette with no sturctural sliders touched, then save the setting, the image appears in my editing window signifcantly altered with altered barrel configur

  • Keyframes control with layer markers

    Hello, I have an animation of a line that has two sets of keyframes of two different properties in CS4. Basically a line gets generated in the first phase then it gets cleared out in the second phase. This is done using two slider controls that act o