November 14, 200223 yr Is there a way that I can STOP carriage returns on certain fields? Or at least use Validation (or something else) to provide a message to the user to correct their entry? It is happening on Win system using alpha [ENTER]. This is very annoying
November 14, 200223 yr hmmm...isnt the enter key for exit a field? Anyway...just search for a CR by Position(textfield, "
November 14, 200223 yr Author Hi Jeff, On Windows enter doesn't exit the field ... it just enters a carriage return ... a real pain! I want to STOP it -- So I CAN use Validation to at least flag it for users, right? Then why do I need to write a script? Sorry I don't understand. Thanks for responding, I appreciate your help
November 14, 200223 yr Well...with that script you can change the field input whitout the CR -OR- Just make a field thats the sum of all the positionfields. When the user wants to go to the next layout and the total of the sum is > 0 you can hold the user and let him/her change the field! jeff
November 14, 200223 yr Hi LaRetta! Set up your field to "Validate by Calculation" The calculation is: If(Position(fieldName, "
November 14, 200223 yr Author Thanks both of you! Okay, so I can use a Validation calc to catch carriage returns in the future! Good! This frustrates me -- I don't want to strip all my fields on a regular basis! THANK YOU!
November 15, 200223 yr Author Thanks Harry! I just got home from work and was re-looking at this issue. Well, even though carriage returns wasn't the reason my billing bombed, I think I want to implement this. I think carriage returns in most fields is trashy!! I just hope it doesn't upset my Users -- ah, well, if it does I can always change it and instead strip returns at night or something. Hey Brian, This is great ... lots of new things to try and learn!! HTH
November 18, 200223 yr Well, you've got the right arguments! (about the use of Position() instead of Patterncount() Harryk
November 18, 200223 yr Well, if you want to get picky, you also need to take into account that PatternCount takes only two arguments, while Position takes 4 arguments. Depending how efficient Filemaker is in evaluating arguments prior to the actual execution of the function, it may actually be faster to use PatternCount, especially if the text string being processed is fairly small. Only testing will tell.
November 18, 200223 yr [chuckle] With most programming languages, that would be a ludicrous suggestion, but with FMP you're probably right... we probably do need to test it to see how large the strings need to be before you overcome the parameter processing!
November 18, 200223 yr A while back, I blindly assumed that the Replace command was faster than running a looping script with a Set Field. Sometimes it is; sometimes it isn't.
Create an account or sign in to comment