Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5795 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

[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

Posted

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.

Posted

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

Posted

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

Posted

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

This topic is 5795 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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