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.

Featured Replies

I can paste any length of text into that field.

Maybe change the script step to:

Set Field [ field; Left(field;10)

and change the trigger to OnObjectModify?

Another way to approach this is to just disallow any key presses besides navigation keys after 10 characters have been entered.

I love script triggers they are definitely going to provide many different, interesting approaches to a problem

MaxLengthTest.zip

  • Author

Hi JesseSFR

your example suffers the same problem of mine: you can paste how many chars you want.

[color:red]Everyone please remember that the event triggers are not data validation tools. They work only on a specific instance of a field on a specific layout.

If you need field validations, use the options in Manage Database....

Steven

  • Author

Maybe change the script step to:

Set Field [ field; Left(field;10)

and change the trigger to OnObjectModify

Yes, it seems a lot better...

just I changed the script to:

Set Field [ Left ( Get ( ActiveFieldContents ) ; 10 ) ]

So it can be used on every field I wish.

  • Author

[color:red]Everyone please remember that the event triggers are not data validation tools.

Hi Steven

that wasn't a validation use of triggers...

It was only a way to stop the user entering data into a field.

that wasn't a validation use of triggers...

It was only a way to stop the user entering data into a field.

Same concept applies. If the field is elsewhere accessible, then the process does not work.

Steven

  • Author

Hmmm...

If the field is elsewhere accessible, I'll attach it the same trigger.

And you can still attach validation to it to be sure. But the trigger is a nice interface option.

... and an auto enter to truncate the input.

But Steven is absolutely right, the way triggers are implemented is ONLY about user interface, not about data integrity/security. There are many ways of working around a 'trigger protected field' (Set Field script step, new field object on layout, including adding it to a table view...)

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.