LaRetta Posted November 14, 2002 Posted November 14, 2002 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
jeffer Posted November 14, 2002 Posted November 14, 2002 hmmm...isnt the enter key for exit a field? Anyway...just search for a CR by Position(textfield, "
LaRetta Posted November 14, 2002 Author Posted November 14, 2002 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
jeffer Posted November 14, 2002 Posted November 14, 2002 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
jasonwood Posted November 14, 2002 Posted November 14, 2002 Hi LaRetta! Set up your field to "Validate by Calculation" The calculation is: If(Position(fieldName, "
LaRetta Posted November 14, 2002 Author Posted November 14, 2002 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!
LaRetta Posted November 15, 2002 Author Posted November 15, 2002 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
kennedy Posted November 15, 2002 Posted November 15, 2002 I agree its better than the If, but I prefer: Position(field, "
harryk Posted November 18, 2002 Posted November 18, 2002 Well, you've got the right arguments! (about the use of Position() instead of Patterncount() Harryk
BobWeaver Posted November 18, 2002 Posted November 18, 2002 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.
kennedy Posted November 18, 2002 Posted November 18, 2002 [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!
BobWeaver Posted November 18, 2002 Posted November 18, 2002 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.
Recommended Posts
This topic is 8112 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now