How can I force users to enter specifc format?

I'm using Livecycle Designer ES2 provided with Acrobat X Pro. 
I have a form where the age field is calculated from the date of birth field.  The date of birth field (DOB) is a date/time field.  The age field (Age) is a numeric field.
Problem is: when user enters 01/01/01 shows age as 101.  When user enters 01/01/2001 age shows 1.  All patterns are set to mm/dd/yyyy.  Is there a way to prohibit the user from continuing to the next field until the proper format is entered?  I'm open to any ideas which will acheive the desrired outcome.  I'm new to livecycle and javascript.  I suspect an easy solution but I can't seem to find it when searching the forums or LD help menu.
I've attached the script for the Age field in case it helps.
Age::calculate - (JavaScript, client)
var ageInYears = 0;
    var birthDate = new Date();
    if ( DOB.rawValue != null )
        // Get current date, and convert user-entered date to a Date object.
        var curDate = new Date();
        birthDate.setTime(Date.parse(DOB.editValue));
        // Set initial age, current year - birth year
        ageInYears = curDate.getFullYear() - birthDate.getFullYear();
        // If we haven't reached the birth month yet, not yet 1 year older...
        if ( curDate.getMonth() < birthDate.getMonth() )
            ageInYears--;
        // If this month is same as birth month but we haven't reached the
        // birth date yet, not yet 1 year older...
        if ( curDate.getMonth() == birthDate.getMonth() )
            if ( curDate.getDate() < birthDate.getDate() )
                ageInYears--;
        // Set age in result field.
        this.rawValue = ageInYears;

Radzmar,
Thanks for the great advice at: http://thelivecycle.blogspot.de/2011/10/date-patterns.html
However I can't get this method to work. I would like the date to display as MM-DD-YYYY regardless of what the user enters. 2 problems show up. First I get this annoying dialog box
and then second the date box doesn't even display the date in the MM-DD-YYYY format I would like. For instance if I enter 10/15/1994 the dialogue box above appears but doesn't display 10-15-1994, it just displays it as 10/15/1994. There seems to be a difference between pressing enter or return on keyboard after typing the date, versus just clicking out of the date box. I can't get a sample date in the "Sample" line like you had. Any ideas?

Similar Messages

  • How can I get user to enter date & time on a form?

    I have a form where I want the user to enter a date and time for an event. The database field is in MYSQL datetime format
    I've used the datepicker on the form field but it only allows for a date entry not time.(eeven when seetin the width to 22 chars
    I remember doing something before which allowed the user to pick a date and then add the time at the end.
    I've got the date defaulted to dd/mm/yyyy and the time to H:mm in the control panel.
    Can anyone help please or is there a better way to enter date and time?.
    Any help appreciated
    Thanks
    Clive

    Two things:
    The column in your database is defined as DateTime, not Date
    You use the option on the Date Picker to choose datetime, not date
    This will give the user the ability to choose a date and time from the date column.  If you need more control over the time, you probably need to add another column defined as Time.  Then you can use the validation rules to force an entry rather than allowing the default (current time).

  • How can i restrict users for entering manual expenditure batch for inventor

    Hi,
    Can someone explain me how to restrict users to enter manual pre approve batch for inventory expenditure class in projects??
    Regards,

    Forms Personalization.
    Regards
    Dharam

  • How to force user to enter supplier/customer name in captial letters in R12

    Dear all,
    Could anyone pls advise how to force user to enter supplier/customer name in captial letters in R12? Can I do it using OA framework personalization?
    HY

    Pl post exact versions of OS and EBS.
    The ability to do this exists in forms (professional user interface) using forms personalization, but does not exist in the OAF (self-service) interface, AFAIK. See related MOS Doc 399892.1 (Is It Possible To Restrict Employee Name Entry To All Upper Case in the PUI And SSHR ?) for some details.
    Pl confirm by opening an SR with Support.
    HTH
    Srini

  • How can I force Time Machine to make a complete backup of my Hard Drive.  I just installed a new external drive for Backup since my previous one failed.  Now when I back up, Time Machine only backs up my data folder and the Users folder.

    How can I force Time Machine to make a complete backup of my Hard Drive.  I just installed a new external drive for Backup since my previous one failed.  Now when I back up, Time Machine only backs up my data folder and the Users folder.
    When I start a backup. Time Machine says "Oldest Backup: None; Latest Backup: None", so it seems like it should do a complete backup, but it only does a partial. 

    Hi I'd like to jump in here. Your app showed me this:
    Time Machine:
              Skip System Files: NO
              Mobile backups: OFF
              Auto backup: YES
              Volumes being backed up:
                        Macintosh HD: Disk size: 749.3 GB Disk used: 453.81 GB
              Destinations:
                        Plastic Wrapper [Local] (Last used)
                        Total size: 999.86 GB
                        Total number of backups: 64
                        Oldest backup: 2013-07-24 23:25:11 +0000
                        Last backup: 2013-11-17 01:40:47 +0000
                        Size of backup disk: Too small
                                  Backup size 999.86 GB < (Disk used 453.81 GB X 3)
              Time Machine details may not be accurate.
              All volumes being backed up may not be listed.
              /sbin excluded from backup!
              /usr excluded from backup!
              /System excluded from backup!
              /bin excluded from backup!
              /private excluded from backup!
              /Library excluded from backup!
              /Applications excluded from backup!
    Aside from the size of my backup drive, which I will increase at some point, I'd really like to have time machine backing up all system folders, especially Applications. How to I reset this hidden exclusions?
    Thanks,
    Darcy

  • How can i stop user to get the same screen while entering same T code

    hi experts,
    how can i stop user to get the same screen while entering same T code (_Means i want user enter same t code but got different different screen how it is possible.)_
    i want to know how can we set a authorization is such a manner ...
    Through different different login id user got different different screen while entering same T-code.
    for example if there is two functional login id mum & noida...
    then user login through that and
    enter any same functional tcode (for getting purchase order)
    but get different different window...so how come it is possible.....
    plz explain in brief
    thanks in advance...plz do reply as soon as possible

    For a custom transaction this is easy, you need to ask your developers to be able to direct users to different screens based on the results of an authorisation check.  You could have an auth field e.g. ZSCREEN which is checked in the program & decides what screen the user has access to.
    For standard transactions, unless already coded, I would forget it & do what is recommended by Subramaniam and create transaction variants as required.  Assign each variant to a custom t-code and users access it that way.
    What I am interested is is why do you want to do this?

  • How to force users to enter their ID and password ?

    I am considering installing AirPort Extreme at our office. We don't want guests connecting to our network. is there any option/software that will force the guest to enter an ID and password to connect to our network ? This is similar to what happens at the hotels when we try to connect to hotel's network.

    How to force users to enter their ID and password?
    is there any option/software that will force the guest to enter an ID and password to connect to our network ? This is similar to what happens at the hotels when we try to connect to hotel's network.
    The AirPort Extreme does not have the features necessary to create a "splash page" that provides basic information about the company and asks users for their identity and password....like you see at most hotels.
    Basically, with an AirPort Extreme, users would have to scan to look for the name of the wireless network to join, and then enter the password to connect.
    The best that you might be able to achieve with the AirPort Extreme is create a "hidden" network, which would require that users know both the name of the wireless network and password to connect.  However, based on experience, this might be more of a hassle than anything else.
    The bottom line.....Apple really designed the AirPort routers for home use, so that might be the best place for them in most cases.

  • Forcing user to enter values at table level

    Hi,
    I have created a table ztest. How to force user to enter the values for certain fields in the table which are not keys, similar to not null in RDBMS. selecting the initial values filed in SE11 populates with some default value, but it doesnt force the user to enter the value.
    Regards,
    Raghu

    Hi,
    Just check out transaction code SE54 for events.
    Go in SE54.
    Give your table name.
    Go in Environment --> Events.
    Here add the Event '01' i.e. Before saving the data.
    Give the name for event eg 'BEFORE_SAVE'.
    Click on Editor to create an include program.
    In the include program write
    form before_save.
      data: f_index like sy-tabix. "Index to note the lines
      loop at total.
        if <action> = 'N' or <action> = 'U'.
          read table extract with key <vim_xtotal_key>.
          if sy-subrc eq 0.
            f_index = sy-tabix.
          else.
            clear f_index.
          endif.
          "(make desired changes to the line TOTAL)
          "End of Modification.
          modify total.
          check f_index gt 0.
          extract = total.
          modify extract index f_index.
        endif.
      endloop.
      sy-subrc = 0.
    endform.
    Note here in field symbol 'Total' your workarea will be their. You can make necessary checks here.
    Or else you can go for making a custom transaction for your requirement.
    Regards,
    Nitin
    *Mark all helpful answers

  • How can I 'force' my Macs to look for each other on the network?

    OK, I have an iMac with a wired connection to a router, and a MacBook Pro with a wireless connection to the same router. Most of the time, they can 'see' one another on the network, no problem. But, every so often, even after both have been on for a while, I will click the Network icon and the other computer will not appear as available - this happens even when the target computer can see the computer I'm using to try to access it.
    So, here's my question: how can I 'force' my Macs to look for (and find) one another on the network?
    Thanks... if you need further information, just ask... - beck

    If you are using Tiger, go to
    Finder menu -> Go -> Connect to Server
    Enter the specific IP address of the other Mac where is says +Server Address+. You can find the IP address by running System Profiler or looking at System Preferences Network pane (on the other Mac).
    Once you have mounted the volume you to access, make an alias for it and place it in the Dock or on your Desktop. The next time you want to connect to that server, use the alias.

  • How to restrict the user to enter only numeric values in a input field

    How to restrict the user to enter only numeric values in a input field.
    For example,
    i have an input field in that i would like to enter
    only numeric values. no special characters,alphabets .
    reply ASAP

    Hi Venuthurupalli,
    As valery has said once you select the value to be of type integer,once you perform an action it will be validated and error message that non numeric characters are there will be shown. If you want to set additional constraints like max value, min value etc you can use simple types for it.
    On the project structure on left hand side under local dictionary ->datatypes->simple types create a simple type of type integer
    The attribute which you are binding to value property ;make its type as simple type which you made
    Hope this helps you
    Regards
    Rohit

  • Developing a 2 page form, username on the 1st page, password on 2nd how can i force FF to use the username from previous page when it asks to remember acct info?

    I am developing a 2 page signup form, where the person enters their username on the 1st page and password on the 2nd.
    When I test the form, FF asks to remember my password for the site - however it thinks the zipcode (field above the password) is the username on the account.
    I have tried to put their username/email in a hidden field on the 2nd page, just above the password field - and that did not work.
    How can i force FF to use the username from previous page when it asks to remember acct info?

    This website is using autocomplete=off to prevent Firefox from saving and filling the name and password.
    You can remove autocomplete=off with a bookmarklet to make Firefox save names and passwords and other form data.
    *http://kb.mozillazine.org/User_name_and_password_not_remembered

  • How can l block users from backing dating transactions

    1. How can l block users from back dating transactions in SAP B1. It was discovered that, in production dept there is this allowance given to them to keep producing for the previous month in the new month; this according to line staff is to enable them meet up their monthly target, after a meeting with the management it was resolved to block that right of backdation of enteries. how can l  correct  this.
    2. How can l change the decimal places backward in the general settings of administration of SAP B1( iniatially it was set to be 5 under Quantity now want to correct it to 3 how do l go about this).
    Joel

    Joel,
    By forum rule, one question for one thread.  I will answer you the second:  If you are using 2007 version, the option to decrease decimal place is not available.  Check this thread to know more:
    Re: REDUCE NUMBER OF DECIMAL PLACES
    Also note: this forum is just for B1 system administration.  Please post it on the main forum.
    Thanks,
    Gordon

  • Force user to enter text if checks YES check box

    I have created a form with YES and NO check boxes.  If user checks YES, they need to provide written reason.  Is there a way to "force" user to enter text into text box if they check the YES check box?
    Thanks,
    Toyro

    Hi Jodi,
    Yes, it has to be saved as a dynamic PDF.
    Additionally, there are some name mismatches in your form so the script was failing. My script defined page 1 as 'page1' while your form defined page 1 as 'Page1'. I renamed your form page 1 to 'page1' and the script worked fine.
    I would recommend enabling the debugger in Acrobat for form developement. See Edit > Preferences and enable the following:
    I added an additional button with some script on the button 'click' event.
    The purpose is to intervene in the submission process, in your case submitting by email. With a single submit button the email dialogue fires regardless of failed form validation. By introducing a second button you can do form validation before enabling submission. The attached form has a visible button called 'submitBtn' and your original 'Submit By Email' button which is declared as 'invisible'. My 'submitBtn' is labelled 'Submit By Email'. When the button is clicked is does form validation. If validation succeeds, I call form1.page1.Button1.execEvent("click"); to submit to the email address attached to 'Button1'.
    Take a look and see if it fits your requirements.
    Steve

  • How can I force specific devices to use a specific Airport Express?

    I have an Airport Extreme router on the main level of my three level house. I have a 1st Generation Airport Express on the same level, extending my wireless network and acting as an airplay device.
    I have added another Airport Express (2nd Generation) in my basement to be close to several wifi-ready devices (Wii, AV receiver, Blu-ray player). How can I force these particular devices to connect to the new and 'closest' device, just 20 feet away? Some, but not all, are connecting still to my Airport Extreme with a 'good/average' connection. Specifically, I'd like to force the blu-ray player to use my new Express, to eliminate buffering on my blu-ray player (Vudu - movie rentals).
    Suggestions?

    It might help to remember that the AirPort Express...or any other "extending" device....can only extend the quality of signal that it receives.
    So the trick is to get the best signal possible to the extending device......and also....have it provide a good signal for other devices.  It's a compromise at best with the best location for the "extending" device about half the distance between the main router and the devices that need more wireless signal.
    This assumes no major obstructions in the signal path.....and unfortunately a floor/ceiling is a major obstruction....often the thickest barrier in a home.
    Unfortunately, users tend to locate the extending device where they feel that they need more wireless coverage....in a weak signal area....and then the extending device receives a weak signal and extends that weak signal quality.  The result is little or no improvement at all.
    It is going to take some experimentation to find the best compromise if you want to extend using wireless only. Even a good connection results in half of the bandwidth being lost, so you might want to think about a "Plan B" in case wireless will not deliver the bandwidth that you need.

  • I had over 200 e-mails.  I went to my webmail and deleted most of them.  However, my iPhone still shows 200 e-mails.  How can I force my iPhone to update from the e-mail server?  Or will I have to delete each e-mail from my iPhone as well?  Thanks.

    I had over 200 e-mails.  I went to my webmail and deleted most of them.  However, my iPhone still shows 200 e-mails.  How can I force my iPhone to update from the e-mail server?  Or will I have to delete each e-mail from my iPhone as well?  Thanks.

    You may have to try deleting all the music from your phone (by going to Settings>General>Usage>Music, swipping All Music and tapping Delete), then sync it all back on with iTunes in order to fix this.

Maybe you are looking for

  • Developing: Endless loop in Adobe Bridge with and Adobe Drive CMIS Connector

    Hi Currently I’m implementing a CMIS-Server for the dam system of my company, using the apache chemistry framework. One of the main requirements is that adobe drive works with it. At the moment I implemented only the navigation services (getChildren,

  • Itunes has stopped working Vista - ntdll.dll problem

    Hi, I've been having a problem with my itunes for the last month or so... Whenever I try to open itunes, it comes up with the "itunes has stopped working" message and won't open.  This is the problem data I found. Problem Event Name:          APPCRAS

  • Upload clipboard or file to a selection in the internet explorer

    Hello gurus, I built a query at the Bex 7 and on this query I built an WebTemplate in the Web Application Designer. This template is implemented in the portal. The customer open the template at the Internet Explorer (IE). At the beginning a selection

  • Apple graphic card replacement

    Hi, I own mid 2011 iMac 3,4 i7 model with 6790 2GB graphic card which is broken. Found Apple replacement program for those cards : http://9to5mac.com/2013/08/16/apple-opens-graphics-card-replacement-program-for- some-mid-2011-imacs/ Can someone tell

  • Retreiveing RFC destination attributes using JCoDestination

    Hello experts, I have created a RFC destination in 2 CE 7.11 servers via NWA. When I use the following code on one of the servers: JCoDestination destination = JCoDestinationManager.getDestination(BACKEND_CONNECTION); destination.getAttributes(); I g