Validation only when digits entered

I use Designer 7.0 to create my forms.
I wanted to use the following script in the
exit event to check if the user enters digits or letters and
enable or disable the validation script.
//var reg = /^\d+$/;
var reg = /\d+/;
var check = reg.exec(xfa.resolveNode("#subform[0].#field[0]").rawValue);
if (check == null) then
xfa.host.validationsEnabled.false
else
xfa.host.validationsEnabled.true
this.rawValue >= -5 && this.rawValue <= 5;
endif
it does not work
and I have always problems using
if in my scripts because I
don't know the exact way to use it.
Also I don't know if the validationsEnabled term is used correct because
I found something about it here in the forum but not for my needs.
Thank's
A.X.Wimmer

I use Designer 7.0 to create my forms.
I wanted to use the following script in the
exit event to check if the user enters digits or letters and
enable or disable the validation script.
//var reg = /^\d+$/;
var reg = /\d+/;
var check = reg.exec(xfa.resolveNode("#subform[0].#field[0]").rawValue);
if (check == null) then
xfa.host.validationsEnabled.false
else
xfa.host.validationsEnabled.true
this.rawValue >= -5 && this.rawValue <= 5;
endif
it does not work
and I have always problems using
if in my scripts because I
don't know the exact way to use it.
Also I don't know if the validationsEnabled term is used correct because
I found something about it here in the forum but not for my needs.
Thank's
A.X.Wimmer

Similar Messages

  • Spry Validation only when needed

    I'm trying to validate a field only when I need to.
    In the following code, if the register checkbox is checked,
    then the user must fill the uname text field. Otherwise they can
    leave it blank. Unfortunately, this is not working.

    I'm trying to validate a field only when I need to.
    In the following code, if the register checkbox is checked,
    then the user must fill the uname text field. Otherwise they can
    leave it blank. Unfortunately, this is not working.

  • F110 issue only when I enter parameters in Free Selection

    Hi,
    When I run F110 for a particular vendor by giving the Vendor number, the document for which I want to make the payment is getting picked along with 100 other documents. To prevent all documents from being picked in the proposal, if I specify only the document number which I want in the Free Selection, the proposal does not contain any document. That is, the document which was picked along with other documents when I did the Proposal run without any parameters in "Free Selection" is also not getting picked up now in the Proposal created when I explicitly specify the document number in Free Selection.
    Let me know the possible reason for this issue. I have used Free Selection number of times before in F110 but never faced this issue.
    Rgds
    Sandeep

    Hi Sandeep,
    In all probability, I can think of this only that, instead of selecting include you have selected exclude in free selection.
    Because with same parameters and w/o Free selection, when you are getting the required document along with all other document, then there is no reason why you will not get if you enter the Document no. in free selection with same parameters.
    Can you please check.
    Thanks & Regards,
    Kavita

  • Having problem buying online.need your help since it's my first time here.apple is asking for my billing address but when i enter my address here in qatar,it's saying i should enter a valid zip code within the u.s.does it mean i can't buy online

    having problem buying online.need your help since it's my first time here.apple is asking for my billing address but when i enter my address here in qatar,it's saying i should enter a valid zip code within the u.s.does it mean i can't buy online even if it wil be shipped within u.s. only?

    To buy in for delivery in Qatar, you should be starting from the Apple Qatar site:
    http://www.apple.com/qa/
    Do you have an Apple-ID? if you do, then you should not have to enter your Address again, and may be able to sidestep the US Zip Code issue.

  • When I enter a single digit in a cell, it lists multiple digits

    I wish to type a number into a single cell.  If the number has multiple digits like 123 (for example), the cell accepts it just fine.  However, sometimes I need to enter just a single digit number into the cell, such as a 5 (for example).  When I enter in 5, it does not accept it, and it has a very long string of numbers pop up in a window within the cell, and sometimes it even has a + sign and even a letter pop up at the end of the string.  The only way to get rid of the long string of numbers is to add a 0 in front of the 5.  However, I don't want to have to add a 0 in front of it every time. 
    any help would be appreciated. 
    Thanks!!  Midnight

         Here is where I try to insert a 1 in the cell under JAN
         If I type in 1 and hit enter, it gives me this weird figure, with a plus sign.
    Again, thank you for your help.
    Midnight

  • Print the form only when valid

    Hello,
    I have a PrintButton on my PDF form which activates the form validation. The print dialog appears only when the form is valid. However, users still can print the form using the File Menu or Toolbar. I tried to deny printing in the PDFSecurity tab of the Form Properties and re-enable it once the form is valid (xfa.PDFSecurity.SetAttribute("1","print")) but it does not work.
    Is it possible to force the user to print only with my print-validate button? What would be the appropriate way to do that?
    Thanks
    Julie

    Hi Johnny,
    The only way that Acrobat or Reader can vouch for the integrity of the digital signature is from within the application. Once you print the file Acrobat/Reader has no way of verifying that the printed document is cryptographically sound (which is what a digital signature proves). As such, we specifically inhibit printing the signature status.
    Another way to think of this is, the validity of an electonic document can only be guaranteed in the electonic environment. Once the document moves into the physical world Acrobat (or any application that processes digital signatures) has lost control.
    Steve

  • HT204053 I am trying to sign up for icloud using windows 7. When I enter my apple id it says "this is a valid apple id but is not an icloud account". Where do I create an icloud account?

    I am trying to sign up for icloud using windows 7. When I enter my apple id it says "this is a valid apple id but is not an icloud account". Where do I create an icloud account?

    I already quoted the minimum requirements, look in the post before yours.
    You will have to upgrade your Mac to at least 10.7.5, upgrades are not free, you buy them from the App Store. Mountain Lion is the best but your Mac must be compatible.
    Here is a list of compatible machines.
    Also note that some older apps (Office 2004, Appleworks) will not run on Mountain Lion.

  • When I enter a web address, hitting enter does not bring it up. I have to use my mouse and click "go to address" arrow. This only recently started. How do I fix this?

    when I enter a web address, hitting enter does not bring it up. I have to use my mouse and click "go to address" arrow. This only recently started. How do I fix this?
    When I open firefox my home page comes right up, but, anything I enter after that does not open by hitting enter.
    Please advice,
    Anita

    Probably caused by an extension that you have installed. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • I install windows 7 on my mac pro. and participate in windows 7 to 50gb 2 disk. but now i cannot enter my mac. only windows is appearing what should i do. when try enter my mac want me to format rest of disk. how can i reinstall my mac

    i install windows 7 on my mac pro. and participate in windows 7 to 50gb 2 disk. but now i cannot enter my mac. only windows is appearing what should i do. when try enter my mac want me to format rest of the disk. how can i reinstall my mac?

    If you use Windows program to partition the Hard Drive, the Apple partition gets destroyed.
    Windows does not understand it is a guest on your Mac, and throws garabge wherever it pleases.

  • When I enter my photos app(only on my iPad Air), it says my iCloud storage can't update because it's full. In the settings it says I have 1,5 GB storage left. How do I solve this problem?

    When I enter my photos app(only on my iPad Air), it says my iCloud storage can't update because it's full. In the settings it says I have 1,5 GB storage left. How do I solve this problem?

    Welcome to the Apple community.
    Could you please clarify what it is that is full, your iPad or your iCloud storage.

  • My time capsule says it only has 473.24 gb for my back up of 534gb.  the only back up I can access when I enter the time machine was yesterdays so what has happened?

    my time capsule says it only has 473.24 gb for my back up of 534gb.  the only back up I can access when I enter the time machine was yesterdays so any idea what is happening? I have the latest irmware update.
    Marmimag

    There is an issue with latest Lion update.. it is killing TM.
    https://discussions.apple.com/message/19858557#19858557
    Otherwise check via the airport utility if there is something else using space on the hard disk.

  • Only when I'm in mozilla, the enter key becomes slow, very slow to change paragraph

    Only when I'm in mozilla firefox, the "enter" key becomes slow, very slow, to change paragraph. I do not this happens in "Word" and I do not this happens in other browsers. A
    nyone know what happens? (I have a good updated antivirus, there is not the problem). W
    hile waiting for an answer, thanks. M
    aurosti

    You could adjust the mailnews.tcptimeout preference, as explained in the 2nd point in [http://kb.mozillazine.org/Can_not_send_large_attachments this article]. Also, make sure there's no security program scanning outgoing mail attachments.

  • I am installing CS6, for the first time, on a Mac, from a CD.  I have a valid serial number that I just obtained.  When I enter the serial number, it is not validated and I cannot continue.

    I am installing CS6, for the first time, on a Mac, from a CD.  I have a valid serial number that I just obtained.  When I enter the serial number, it is not validated and I cannot continue.

    Error "The serial number is not valid for this product" | Creative Suite

  • I am trying to create a panorama, when I enter File New I don't get the Photomerge Panorama option, the only options that appear are Blank file and File from clipboard.  How do I get photomerge panorama

    I am trying to create a panorama.  When I enter FILE > NEW > the Photomere panorama option does not appear.  the only options are Blank file and file from clipboard.  This is in Elements 11 on Windows 8.1 OS.  How do I get Photomerge Panorama to appear.

    Since PSE11, you access the photomerge option in the 'Enhance' menu, last option. Or you can use the organizer (menu Edit / Photomerge).

  • I would like to format cells with time only.  when I enter a time of day the current date is still in the cell which is not necessarily so

    I would like to format cells with time only.  when I enter a time of day the current date is still in the cell which is not necessarily so.  THere are  no options for just  date .

    christine275 wrote:
    ... (this is a time worked by date and not always entered on the date worked)--
    "Time" in Numbers is always "Time of Day", and is always part of a Date and Time value. "Amount of Time" is a Duration value, which may be displayed in a similar format to "Time of Day," but is a different type of value.
    If you are entering the number of hours and minutes worked, format the column as Duration, set the units and the format in which you want to have the value appear.
    The Date column will still contain a Date and Time value (Jan 1, 2011 00:00:00 in the cell shown in the example), but the "Time Worked" cells will contain only a Duration value.
    Incidently, the Date in A2 was entered as "jan 1" (without the quotes). Numbers automatically adds the current year and the default time value, then displays the result in the closest format to what you've entered, or in the Date and Time format you have chosen.
    The Duration value in B2 was entered as 3:15 (as displayed). Note that in the entry bar the duration is displayed as 3h 15m, probably to distinguish it from a similarly formatted (Date and) Time value.
    Regards,
    Barry

Maybe you are looking for

  • Wierd button behavior: flashing between Up and Over, won't go to frames

    I have this strange behavior with buttons.  These are button instances, not movie clips used as buttons. I created a list of buttons for a drop down menu. Created the first one then dupliacted the symbol to create the others. The buttons have an Up a

  • Frame doesn't fit content

    Hi! One of my collaborator has a problem seeing my project. On my side, I've tried it on Chrome, Explorer and Firefox, it work very well (project is on our server). But on his side, the frame doesn't fit the content. As you can see in the picture the

  • ITunes Music Video. Sound but no video

    Today I updated to OS X 10.7 Lion and have also installed iTunes 10.4. Now I have a problem playing music videos, they play but I get sound only and no video. How do I get the video stream to run as well? Thanks

  • How to use forfiles= without recreating over and over?

    I'm struggling trying to get some file testing done and can't figure what the right combination of commands should be. The goal is to have a number of files created (64, for example), then run different tests on those files, varying the number of fil

  • Love Photoshop CS6 - Another Quirk

    Hmm, while I really am enjoying CS6 some of the subtle changes are becoming annoying. I use layers for portrait retouching and in all prior versions of CS I can hit CTL J to create a duplicate layer, then I could right click and it wiould bring up th