Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Prohibit Carriage Returns on a field?

Featured Replies

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 mad.gif

hmmm...isnt the enter key for exit a field? Anyway...just search for a CR by B) Position(textfield, "

  • 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 smile.gif

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

Hi LaRetta!

Set up your field to "Validate by Calculation"

The calculation is:

If(Position(fieldName, "

  • 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! smile.gif THANK YOU!

Valdiation:

PatternCount(field;"

  • 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. smirk.gif Hey Brian, This is great ... lots of new things to try and learn!! grin.gif HTH

I agree its better than the If, but I prefer:

Position(field, "

Well, you've got the right arguments! (about the use of Position() instead of Patterncount()

Harryk

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. tongue.gif

[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!

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.