July 15, 201411 yr Hello, I have a FileMaker file that connects to an Oracle database via ODBC to display some data. I have a global field set up for searching out serial numbers. I had defined an auto-enter calculation that replaces the existing value in the field, using the Upper() function. This works just fine. However, someone discovered this morning that if they hit the Return key after entering the serial number (thus adding a newline (carriage return) into the field), they would get a different result from the database. So, I went back and changed my calculation to Upper (Trim(SerialSearch)) . This doesn't remove any hard-returns from the end of the input. I have also tried the Substitute function, but this doesn't work, either. I even tried LeftValues (SerialSearch; 1), but FM seems to consider the entire field as one value, even with the LF character in there. What gives? Any ideas? As an alternative to calculations, is there any way to disable the Return key in an input field, so that newlines can't be entered? (P.S. - What's the code to enter a pilcrow here?)
July 15, 201411 yr Try Upper ( Trim ( Substitute ( SerialSearch ; [ Char(10) ; "" ] ; [ Char(13) ; "" ] ) ) ) (P.S. - What's the code to enter a pilcrow here?) Press alt-7 (assuming you have a US keyboard). As an alternative to calculations, is there any way to disable the Return key in an input field, so that newlines can't be entered? In the inspector, specify it as a key to go to the next field in the tab order (which may not be want you want).
July 15, 201411 yr Author Actually, after a restart of FileMaker, the calculation seems to work. I always have trouble with this particular file, but I think it's got more to do with the Oracle database it connects to. It has lots of oddities. Thanks for the tips on the ¶ (works!) and the Return key. Both fit the bill nicely!
Create an account or sign in to comment