I guess the only half-decent way around this is validation within the field definition. Not very elegant, but at least avoids GIGO. I hope this gets fixed in a later rev.
Other than that and a few minor issues, this is a rocking product. Love the new features.
Auto Enter calculation
Substitute ( Self ; “¶” ; “” )
That's OK for text, but every single field needs one, and the intended text usually becomes "one line of textone line of text". The text disappears so the user types the same text in again more often than not.
Numbers are more of a problem, and the substitute cannot be used. For numbers, you can post trap by insisting that they be validated as numbers.
With the incredible detail work done on Web Direct, this is a crazy simple thing for FMI to add but a real GIGO issue that remains since the beginning of IWP.
Are you interested in solutions or do you just want to vent?
Are you sure number fields are an issue? In Pro, if you hit the Return key in anything but a text field nothing happens.
If so, you don't need Substitute(), a Filter() will do. Filter ( Self ; "1234567890.-" )
Solutions. That's why I asked if there's a better way. No good way in IWP, possibly a good way in WD.
Yes, I'm sure this is an issue in both IWP and in WD. There may be a better way than what we have been doing for years in IWP. Filter will also not work for the same reasons I outlined above. Returns are accepted in IWP and WD number fields.
In typical web usage, there are plenty of situations where the user can type a value in a text box, and hit return, and it will "submit the form" or call a script without the user having to click submit.
I have a webdirect solution where I want the user to enter a value in a text box, and then when they hit enter, call a script to process their input.
I have it set to run a script trigger "on object save" and to go to next object when the user hits the return or enter or tab keys.
In WebDirect, the script will get called if they commit the record by clicking in the negative space around the text box, but hitting return or enter while they are in the the field will simply insert a carriage return. I tried setting the text field to a number but it still goes to the next line of text instead of committing the record.
FileMaker's omission of this feature is very frustrating. I will try the "on keystroke" script to try and capture the return character. It seems to be the only way!
From the FileMaker Training Series Advanced, Page 5-31:
"The only triggers not supported by FileMaker WebDirect are OnObjectKeystroke and OnLayoutKeystroke."
Might need to look for another solution.
OnObjectValidate will work with a script that attempts to determine their intent, although this will cause additional web traffic.
Simple Substitute and Filter will not work, because users still enter 35<ret>35 when their first value disappears, and sometimes leave the screen with an unintended 3,535. [edit: numbers fields hold the return, but show ?]
==> We are trying OnObjectValidate on some important fields, and are playing around with something as follows
Set Field (do not specifiy a target so this works on all fields)
Let ( [
field = GetField ( Get ( ActiveFieldTableName ) & "::" & Get ( ActiveFieldName ) ) ;
position = ValueCount ( field ) ] ;
GetValue ( field ; position )
This will accept the last value no matter how many returns they used. We figure the user's intent was what they last saw on their screen. Still very much a kludge no matter what you do.
The poor handling of returns in fields is one reason that I consider WebDirect unusable for real work at this time.
Rather old thread here, but this is still a problem in WD on FMS 15. I was just running across this today.
I don't see the issue on FMS15v2 using Windows7 as client. (IE or Chrome)
Enter is treated as commit record or go to next field or does nothing.