Skip 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.

Maximum number of characters

Featured Replies

  • Newbies

I wonder if there is any way to use the value set in the "Maximum number of characters" (in the menu Field> Validation) in a script.

I have not found any function that returns this value.

Thanks,

Vitor Cedran

If there was a way, how would you use it?

The way you could do it is store the max length in a field in a prefs table and reference it in a validation calculation.

Check out Length():) Length ( yourField ) :less: num where num is the number of characters.

"(in the menu Field> Validation) in a script." Not making sense as Daniele suggested. Do you want this at field-level validation, script trigger (upon validate) or in script?

If field definitions validation, validation will pass if it is true (produces boolean 1) so if max length should be 10 then validation would be: Length ( Self ) :less: 10

Edited by Guest

  • Author
  • Newbies

Check out Length():) Length ( yourField ) :less: num where num is the number of characters.

"(in the menu Field> Validation) in a script." Not making sense as Daniele suggested. Do you want this at field-level validation, script trigger (upon validate) or in script?

If field definitions validation, validation will pass if it is true (produces boolean 1) so if max length should be 10 then validation would be: Length ( Self ) :less: 10

Thanks for the help !

But I want to use the value of maxlenght (the same value shown in "Maximum number of characters") to make a validation in script.

I'll compare this value with the lenght of the field to make a custom validation.

I wonder if there is any function that returns this value.

Thanks,

Vitor Cedran

I thought of that, but there's no need to know wich is the max-lenght because FileMaker just knows it and will return error 511 ( Value in field exceeds maximum number of allowed characters ) if you try to enter a number of chars > of max-lenght.

All you need to do is check the "Always" radio button on the validation option for that field.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.