FormattedValue for time

Hello all,
I'm having some trouble with the formattedValue property.
So far, i have used it successfully in order to validate the date format when the user exits a date field in my form. The solution was quite easy to find, and although i didn't understand fully how it worked it copied/pasted it in my javascript code.
For those interested, here's the deal:
if(this.rawValue == this.formattedValue){
    xfa.host.messageBox("Please use the calendar or enter a date in the format DD/MM/YYYY (e.g. 05/03/2011)");
    xfa.host.setFocus(this.somExpression);
    this.rawValue = "";
As i understood it, when the user inputs something in a date field the "formattedValue" of the field is the input formatted with the format defined in the object property, eg DD/MM/YYYY in my case. If it cannot be formatted, then the "formattedValue" is equal to the "rawValue" and thus there is some kind of problem that is handled by the "if" condition.
I also have time fields in my form. In the object properties, i have set the format to "HH:MM:SS".
Naturally, i thought I could use the same trick to force the user to input a correct time format. But there's some difficulties: it works except when the user actually inputs a time that is already correctly formatted. So, if the user inputs "12:05:05" for example, the formattedValue is equal to the rawValue. Thus the if condition is true and that should not be the case...
of course, i could write a few lines to split the string, parse into int, then check the values (>0 and <24 for hours, etc.), but i'd like to have something a little bit cleaner...
With the date, everything works fine, because the rawValue, for some reason, is automatically formatted with YYYY-MM-DD. Thus the formattedValue is never the same as the rawValue when the date is correct...
Isn't there a way to find a simple solution? maybe have a time default format like "hh:mm:ss:ms" (with milliseconds) ?
thank you.

I am working on timesheet form
I have Start and End time fields:
Date/Time field
Pattern is set this way
Display: time{KK:MM}
Edit : time{KK:MM}|time{KKMM}|time{KK MM}|time{KK-MM}|time{KK.MM.SS}|time{KK.MM}|time{KK,MM}
Data and Validate tabe are empty:
This is the code on Exit event:
if  
(this.formattedValue === this.rawValue){
xfa.host.messageBox("Please enter correct data format");
xfa.host.setFocus( 
this);this.rawValue
= "";}
This is the code on Change event:
var  
maxLength = 4;
if  
(xfa.event.newText.length > maxLength )xfa.event.change = "";
On validate event I have a code that calls function to make sure no letters are allowed
On Validate:
docLevel.validateField(this.name 
,docLevel.onlyNum,docLevel.onlyNumMsg);
Function is :
var  
onlyNum = /^\d*$/;
var  
onlyNumMsg = " Please enter only numeric values.";
function  
validateField (getField, getRegex, getAlertMsg) {
var  
fieldFocus = xfa.resolveNode(getField);
var  
regex = new RegExp(); regex.compile(getRegex);
var  
runRegex = regex.test(fieldFocus.rawValue);
if  
(fieldFocus.rawValue != null && runRegex == false) {
app.alert(getAlertMsg 
, 1, 0, "Numeric fields error"); fieldFocus.rawValue 
= null;xfa.host.setFocus(getField);
I have few questions:
1. why it does not allow me to enter e.g 23:22
2. why when I enter 2345 does not recognize it as a numeric value and give me an error message "
" Please enter only numeric values."; What am I missing to be able to enter value like 1111 to have 11:11 or 23:11 correctly formated.Btw, how do I attache sample form I have to show the issue? 

Similar Messages

  • HT201250 Can I partition my external hard drive and use one partion for time machine and the other one for data that i may want to use in different computers?

    I have this doubt. I've just bought an external drive, especifically a Seagate GoFlex Desk 3 tb.
    I want to know if it is recomendable to make a partion exclusively for time machine and let another one so I can put there music, photos, videos, etc that I should need to use or copy to another computer.
    May half and half, 1.5 tb for time machine and 1.5 tb for data.
    I have an internal hard drive of 500 GB (499.25 GB) in my macbook pro.
    Any recommendation?

    As I said, yes. Be sure your Time Machine partition has at least 1 TB for backups.
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to two (2). Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.

  • Can I use my time capsule for time machine back ups and as an external storage device?

    I have a time capsule and have set it up so that my time machine back ups are saved on it, but I would also like to use it as an external hard drive. Is this possible?
    I know nothing about computers so please tell me in very basic terms. thankyou!

    By external hard disk we usually mean one plugged into the computer by USB or Firewire or Thunderbolt.
    None of those works on the TC.. it is plugged in by ethernet or use wireless connection.. that means it is a network drive.. not an external drive. The difference might not mean much to you.. but it is totally different to the computer. In the former case the computer has full control of the disk. In the case of the network drive, the disk is controlled by the TC firmware and the files are stored and accessed by network. This has large implications.
    So here is my standard response.
    Store files on the TC.
    This is asked several times a day.. obviously people are struggling with their latest SSD being too small.
    The TC is not suitable for network file server.. but many people having no choice press it into service as such.
    Major issues.
    1. No backup.. no way Time Machine can backup a network drive. No place to backup to.. So all your files will be at risk. And you will need to buy a third party like CCC to do backup.
    2. The TC cannot be partitioned and mixing TM backups and data is not great. It was and is and ever shall be a backup device for Time Machine.
    3. The drive is slow to spin up and quick to spin down.. there is no control. In fact the TC is so lacking in controls for even the router side.. that you cannot do more than the most basic of setups.
    The following are controls on the hard disk side.
    Reformat it. You can name the share. You can do a full archive of the whole disk. This will go at a speed of aprox. 30-50GB/Hr so calculate how long an archive of a full 2TB will take.
    4. iPhoto in particular can easily corrupt its entire library with wireless networking causing a disconnection to one photo. Even if you do this;;; do not move your photo library... you have been warned!!
              Even apple btw say don’t do it.
    http://support.apple.com/kb/TS5168 Although mostly about FAT32           it adds network drives.
    5. iTunes can constantly lose connection to the library. The disk is slow to respond.. itunes on the computer will constantly spit out errors. Even in the midst of streaming the TC can spin down the disk due to caching.
    6. Do not use any live files on the TC no matter what else you do.. if you edit files in whatever program the file must be on the local hard disk.
    7. The only suitable location for most libraries is a computer. You can plug in an external hard disk.
    Read pondini for some work arounds.
    Q3 here. http://pondini.org/TM/Time_Capsule.html

  • My external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive. Same thing has happened with Final Cut Express.

    My new LaCie external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive.
    The same thing happened recently between Final Cut Express and my other LaCie external hard drive used as the Scratch disk. It fixed itself.
    I've run out of ideas. Help would be very much appreciated. Thanks.

    have you done some searches on FCPx and time machine? Is there a known issue with using a TM drive with FCPx? dunno but ...wait...I'll take 60 sec for you cause I'm just that kind of guy....   google...." fcpx time machine problem"  Frist page link 
    http://www.premiumbeat.com/blog/fcpx-bug-best-practices-for-using-external-hard- drives-and-final-cut-pro-x/
           You cannot have time machine backups on your hard drive if you intend to use it in FCPX.
    booya!

  • Do I need to keep my external hard drive connected at all times for time capsule?

    Do I need to keep my external hard drive connected at all times for time capsule?

    Hi,
    I have a similar question. I have backed up my external hard drive through my computer, onto my TC. When I go into TM, it doesn't show the external hard drive unless it is connected to the computer. Can I access the info from the external hard drive that is on the TC if I don't have the hard drive plugged in? If so, how can I do that?
    Thanks,
    Bernadette

  • Need to develop a Mobile Application for Time Entry

    Hi,
    I need to develop a Mobile App for Time Entry details which can used as an Applicaion on Android or iOS.
    Can anyone help me with the approach i need to follow to develop such an application which can be used on Android or other OS.
    Thanks,
    CV

    Hi CV,
    Oracle Application Development Framework Mobile (ADF Mobile) browser is a standards-based framework that enables the rapid development of enterprise mobile applications. Oracle Fusion Middleware 11g release 1 of ADF Mobile browser extends Oracle ADF to browsers running on mobile devices. Because ADF Mobile browser is built upon the component model of Java Server Faces (JSF), you can quickly develop applications for mobile browsers. ADF Mobile browser's mobile-specific extensions to JSF enable you to develop mobile applications using the same methodologies for developing JSF applications for the desktop.
    http://docs.oracle.com/cd/E17904_01/web.1111/e10140/pda_ovrv.htm#ADFMB101
    Cheers,
    Vlad
    Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question. If you think this is helpful, please consider giving points

  • Can I use the same external hd for time machine and storage without partitioning it?

    Hello,
    I have been using an external hard drive for my Time Machine that was only used for this purpose.
    I downloaded some files in it that I want to use, and I haven't backed up using Time Machine since.
    Can I download the files on my MacBook from the HD without running into any problems, or is there anything else I should do?
    I prefer not to partition the hd, since I will be deleting these files, or transferring them to a different HD, and using this HD only for Time Machine back ups, as I did previously.
    ** I am not sure if this changes anything, but I just updated from Snow Leopard to Lion.
    Thank you so much

    carolsm wrote:
    Thanks Kappy, I will do that.
    I just really needed these files and had no other hard drive to store them.
    Do you think that it will be okay just this one time if I download the files on my MacBook without compromising my backups?
    I will transfer them to a new hard drive, and erase them from my Time Machine external  hard drive.
    For the time being it will be fine. There is always a chance of a disc crashing and therefore not advisable practice. Some here run seperate drives with Time Machine, Cloned backup and file backup. I have a portable drive I keep Time Machine backups and file backups on. I am running that at my own risk, but no problems over the last couple of years. Just make sure I get it to my normal TM Backup disk as soon as I get home. Backing up those other files will not compromise your Time Machine backups as you asked.
    Cheers
    Pete

  • My 320GB external drive for Time Machine now only has enough capacity to keep a backup of one day. All my other backups are gone.  What can I do to fix this situation?

    I've been using a 320GB external drive for time machine for the last several years.  The backups always worked fine and when necessary I was able to look at & restore older data from the time capsule.  Recently, I keep getting the message that a backup cannot be completed and an older backup will be deleted. Usually this wasn't an issue because I still had several months of information on disk.  Now a one-time backup takes up 315GB and therefore I only have a backup of the previous day.  I don't understand this because I thought that the backup only saves information that has changed and doesn't copy everything everytime.  What do I need to do to get my backups to a reasonable size so that I can keep at least 1 month data stored on it.?  Please don't tell me I need a larger drive ... that would be too easy. 

    Get a larger drive for your TM backups.
    The recommended size is 3 times what you are backup. So if 315 GB is a backup then you need a 1 TB drive.
    Allan

  • I am trying to install Mavericks on my McbookAir, but it won't install, saying that my hd is used for time machine backups. I have an external HD connected to my mbAir that I'm using for time machine.

    2012 Macbk air, with OSX 10.8.5. See my question above. Mavericks won't install on my Air's HD, says that both the HD - AND - the external HD (which has a different name from the laptop HD) are used for time machine backups. I've deleted my time machine plists, restarted, repaired permissions, turned time machine off, repeatedly selected the external drive in time machine preferences. HELP. (Install went perfectly on my desktop Mac, which also has an external HD for time machine).

    I need to add that the only place I have the "Backups.backupdb" folder is on my backup external disk, and it's not on my HD    :-(    . If it were, I'd delete it!

  • Key Date variable; Interval in query properties for Time Dep. Masterdata

    Hi,
    I've been searching on the forum, and I think I know the answer already, but still I'd like
    to ask you all whether it's possible to create a Key Date Interval variable to be used in the query properties.
    As far as I can see you can only report by a single key date used in the query properties field for time dependant masterdata, but my customer has asked me to investigate the possibility to enter a date range.
    As all masterdata is time dependant I don't see how this would work, but if someone can shine a light on this maybe there is a solution available?
    Thanks for your help.
    M.

    Hi marc
    I understand your problem.
    I had an idea for a workaround.
    If you can create master data compounded with Valid from and Valid to both of these characteristics , how the query is computing
    the keyfigures.
    Every change in valid from or valid to is unique for the system in this case.
    Thanks
    N.Ganesh

  • WAITING FOR TIME CODE....again

    Hi, when I try to capture from DV device, the capture window appears "PREVIEW DISABLED" I can remote the dv device, mark time code in or out, play tape, pause tape, the time code in the capture window run and is the same taht the tape, but when I do batch capture, cpture clip or capture now, the preview window of catpure says : "WAITING FOR TIME CODE" "DEVICE MUST IN VTR MODE WHEN DEVICE CONTROL IS ENABLED" and when I abort the capture this message apperas: "THIS OPERATION COULD NOT BE COMPLETED AS THERE IS NO VIDEO", Quicktime pro is unabled to capture too, but IMOVIE capture without this problem. I download the firewire sdk from developer connection of apple and use AVCVideo Cap, and no problem for cature, so , my Firewire or dv devices are ok, with DVHSCap I capture PRO HD JVC very well.
    Resume , I think there is a problem with quicktime and DV format, My Ibook G4 with FCP 5.0.1 capture from DV devices OK, without problem. If anybody resolved this please comment with us. I work to day with FCP 6.0.4 and quicktime 7.5 and Mac os 10.4.11 and 10.5.4 the problem is afected my PowerPC G5 and my powerbook intel. Another point of interest is that this problem is RANDOM, some times I can capture from DV devices in the first time, some times I can't capture.

    Hey AL
    How ya doin buddy?
    "Either way, try an Easy Setup>DV Converter, to match your video standard (Pal or NTSC)."
    Yep - did that
    Yes actually my older Sony TVR-310 camcorder IS a digital unit which can also play back analog tapes.
    As I'm getting my way around now in FCE, I'm coming to some conclusions in regard to FCE's capture capability.
    First let me say that I've also tried capturing some footage in FCE with my other Sony TVR-950, and have had dropped frames, and also breaks in time code.
    I thought dropped frames were strictly a PC issue?
    Anyway, it appears to me that FCE is VERY sensitive to time code issues NO matter which camera is in the chain.
    In fact, I've also read here where folks have a lot of trouble with their Canon GL2's as well. Some of you have even suggested to do your captures in a cheaper Mini DV, or a clam-shell playback machine. This conserves the heads on your GL2 as well.
    But why would FCE do better in regard to capturing and time code, with a cheaper Mini DV Camcorder? Perhaps I'm missing something here?
    Perhaps iMovie doesn't care about the same issue?
    Now my main question is:
    Ok I'll use iMovie6 HD (tried and true), to capture ALL my footage and just save the DV files to be edited later (imported) into FCE.
    Does this sound like a viable solution to FCE's time code issues?
    Will my iMovie captures be JUST AS GOOD as if they were done in FCE?
    Thanx so much guys!
    Mike

  • Can I use one HD for 2 computer for time machine?

    I have an imac and macbook. I bought a new 500G external harddisk for time machine.. can I share the harddisk between 2 computer?
    Or I have to get 2 HD for 2 computer?

    happygal wrote:
    and can I put my other data on the external harddisk apart from the backup from time machine?
    Absolutely. Yes. You will be limiting the space available for Time Machine though. The more space available, the further back your Time Machine backup trail can go.
    Kryten

  • Can I use a network hard drive for time machine

    Can I use a network drive for my time machine back up.  I currently have a 1TB WD AND its full with mostly videos and other back ups?

    Such a configuration is not supported. This does not mean it will not work, but it is not guaranteed to work reliably.
    Considering the "mission profile" for a backup strategy, you should consider this an unacceptable application for Time Machine.
    Read Apple Support Communities contributor Pondini's Time Machine FAQ discussion regarding this subject here:
    http://pondini.org/TM/2.html
    Scroll down to the pink box.
    There are other, significant concerns regarding sharing a Time Machine volume with other content. Time Machine needs to have control of the whole volume.
    More info here: Mac Basics: Time Machine

  • Use portable hard drive for Time Machine & other things

    I recently purchased a 1 TB portable hard drive. I'd like to use it for my Time Machine backups, as well as moving my iTunes library there. Is this an easy change? I'm not super familiar with hard drive set ups. Will I have to create any partitions on the drive?
    Thanks!

    You're welcome. Make sure your drive is formated as Mac OS Extended (journaled), GUID partition table.
    Here's a nice link to use for Time Machine information.
    You can partition the drive if you want to organize your various backups. For example you might create a Time Machine partition and Other Files partition. When Time Machine is working, it creates a folder (Backups.backupdb) and places the Time Machine backups in that folder. The rest of the partition is open to add whatever you want. I have multiple partitions on my USB external drive with Time Machine backups separated from other backups.

  • Can use old macbook for Time Machine Backup?

    Have an old macbook running snow leopard.  Can I use it for Time Machine Back-up for my current macbook pro?

    Boot your old into Target Disk mode, then plug a FireWire cable from your old to your pro.  Presto!  Your old's internal HD will appear in your pro's Finder as a disk on your pro.  Time machine running on your pro can use it for backup.  Time machine won't disturb its contents, except to add a potentially huge folder there, which will grow to fill the disk with copies of your backups. (Backing up, then) partitioning (and then restoring from backup) your old's internal hard drive will keep your pro's Time Machine from consuming all free space.

Maybe you are looking for