Staying on a field

Bob Sneidar bobs at twft.com
Wed May 4 13:04:38 EDT 2011


Rather than validate on closeField, I enter an edit mode in the form where all navigation buttons or commands are disabled, and the only thing the user can do is save or cancel. The Save button calls a global validate command that cycles through all the editable fields, checks for the existence of a property to see if the field is a validating one, then calls the validation function(s) for that field. The property can actually be a list of validations you might want to perform, like not empty, is a date, is a later date, etc. 

I do this because I HATED WITH A PASSION the Filemaker validation which would not let you proceed to another field until you entered valid data, even if you put empty. I found that at times I wanted to go to another table and copy information from there, but couldn't because I was locked into the field and couldn't leave without putting something valid in the field even if it was wrong. 

I felt like Dave in 2001 A Space Odyssey. "I'm sorry Bob, I'm afraid you can't do that." 

Bob


On May 4, 2011, at 12:17 AM, Bill Vlahos wrote:

> Terry,
> 
> Thanks this works. I also discovered that I can replace "focus on me" with "select the text of me" in my script and that works too.
> 
> If the closeField message comes as a result of going to another card then I get the dialog but it still goes to the new card anyway so the dialog doesn't really work if the user wants to try it again.





More information about the use-livecode mailing list