If you change the "and" to an "or" in the IF action it works (@ISNUM is 0, for an empty number, or alpha chars). It looks like the code is working as written, with both "and" and "or" operators.


- Jeff


The IF action (Elseifvalidation) is "('<@ARG ContactTelephone1><@ARG
ContactTelephone2><@ARG ContactTelephone3>'!='') and ('<@ISNUM
VALUE='<@ARG ContactTelephone1><@ARG ContactTelephone2><@ARG
ContactTelephone3>'>'='0')".

ISNUM should equal zero if the phonenumber fields contain any alpha
characters, and equal one if they're numeric only.  This does work - the
Results HTML for that action shows the ISNUM value.

However, it goes to that page no matter whether the data entered is
numeric or alpha.  If you put "A" into one of the fields, it goes
through the IF (should evaluate to "0=0") and the Results show ISNUM=0.
If you put delete the "A" and replace it with "3", it goes through the
IF (should evaluate to "1=0") and get the same results page showing
ISNUM=1.



 -----Original Message-----
 From: Jeff Bohmer [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 05, 2003 6:21 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Witango-Talk: Help with data validation



Where in the TAF's execution does Witango think 1=0?

- Jeff


>OK, this is driving me nuts. I've attached an example file with the
>relevant pieces of my app.
>
>I'm trying to validate form data. I may add javascript validation
>later, but at the moment, I'd rather have it in Witango.
>
>I've got required field data validating fine - see the
>'If_P1_ValidationErrors' tacked on to the end. My strong preference
>would be to include all of the data validation in one IF action.
>
>I want to validate some fairly simple stuff on certain
fields - i.e.,
>valid telephone number, zipcode & basic email formatting. I've tried
>various forms of pattern matching, but can't get any of them to work
>within an IF statement. So I thought I could at least check
to be sure
>the phone & zip fields were all numeric - but I can't even
get that to
>work. Evidently, as far as I can tell from processing the attached
>taf, Witango thinks that 0=0 and 1=0.
>
>Surely someone of you has done this stuff and can tell this
poor fool
>what I'm doing wrong.
>
>Thanks for any help you've got. And a grand weekend to those lucky
>devils who won't be working!
>
>jamileh
>
>
> <<example.taf>>
>
>_____________________________________________________________
__________
>_
>TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
>Content-Type: application/octet-stream;
> name="example.taf"
>Content-Description: example.taf
>Content-Disposition: attachment;
> filename="example.taf"
>
>Attachment converted: Macintosh HD:example.taf (????/----) (000F18AF)


--

 Jeff Bohmer
 VisionLink, Inc.
 _________________________________
 303.402.0170
 www.visionlink.org
 _________________________________
 People. Tools. Change. Community.
 ______________________________________________________________
 __________
 TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

--


Jeff Bohmer
VisionLink, Inc.
_________________________________
303.402.0170
www.visionlink.org
_________________________________
People. Tools. Change. Community.
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to