Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Filemaker > validation scri...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 10 Topic 7981 of 8170
Post > Topic >>

validation scripting

by FastWolf <wolfsofast@[EMAIL PROTECTED] > Apr 17, 2008 at 12:19 AM

Here's the bare bones of a validation script I'm working on.  Steps in
brackets [] represent functions that don't seem to exist in FMPA:

* set field ( titles::t_idv ; titles_lookup::t_idc )
* [ check validation of t_idv ]
* If [ titles::t_idv does pass validation ]
*  set field ( titles::t_id ; titles_lookup::t_idv )
*  commit records
*  halt script
* EndIf
* If [ titles::t_idv does not pass validation ]
*  set field ( titles::t_idv ; titles_lookup::t_idc&"a" )
* EndIf
* [ check validation of t_idv ] 
* If [ titles::t_idv does pass validation ]
*  set field ( titles::t_id ; titles_lookup::t_idv )
*  commit records
*  halt script
* EndIf

where:

# titles_lookup = another table occurance of titles
# titles::t_id = text field, must be unique
# titles::t_idc = calc field that generates a text string by grabbing
characters from another text field
# titles:t_idv = text field, must be unique

I want to create unique values for t_id.  There doesn't seem to be a
function for testing validation.

My idea was to generate an ID (t_idc), stick it in a field (t_idv),
and check to see if it already exists in any record by using a value
list.  The value list consists of all values in t_id.  If it's not in
the list (does pass validation), then stick it in t_id and save it. If
it is in the list (does not pass validation), then append "a" to the
end of the ID and check it again.  This way the ID is held out of the
value list for comparison purposes, and isn't added to the list if
it's in there already.  It seems like there ought to be a way to do
this using the ValueListItems function.

thanks in advance

-- 
FW

FileMaker Pro Advanced 8.5 on Windows XP Pro SP2
FileMaker Server 8.0 on Windows 2003 Server R2
 




 10 Posts in Topic:
validation scripting
FastWolf <wolfsofast@[  2008-04-17 00:19:38 
Re: validation scripting
"Ursus" <urs  2008-04-17 09:40:26 
Re: Re: validation scripting
FastWolf <wolfsofast@[  2008-04-21 14:42:08 
Re: Re: validation scripting
"Ursus" <urs  2008-04-22 10:46:24 
Re: Re: Re: validation scripting
FastWolf <wolfsofast@[  2008-04-22 10:28:16 
Re: validation scripting
Grip <grip@[EMAIL PROT  2008-04-17 07:02:50 
Re: Re: validation scripting
FastWolf <wolfsofast@[  2008-04-21 14:38:28 
Re: validation scripting
Helpful Harry <helpful  2008-04-18 08:50:42 
Re: Re: validation scripting
FastWolf <wolfsofast@[  2008-04-21 14:32:20 
Re: validation scripting
Lynn Allen <lynn@[EMAI  2008-04-26 12:18:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 20 0:27:44 CDT 2008.