Jump to content
Server Maintenance This Week. ×

Filed Size Lock


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

Recommended Posts

I'm aware that you can set a character size within Filemaker, however on the layout there is no way that i am aware of to lock the size of the field, so that a user does not continue to type past the field limit size only to be later notified that they have exceeded the limit of the field characters. In the case of a solution that we use we have a narrative field. Often new users are unaware that they must stay within the size of the field on the layout and type past the limit because there is no way until they commit the record to advise them that they have reached the limit. The same would then apply for the script trigger which will not trigger until the field is committed. By allowing a lock of the size of the field on the layout users would not continue typing over the limit of the field on the layout.... Unless I am missing an existing feature (please tell me if I am) I think that this would be a welcomed modification.

Thanks,

Ron

Link to comment
Share on other sites

You're correct in this, however the issue that I have encountered is that when the users hit the carrige return (or the enter Key) to start a new paragraph, it will not count as characters entered from that point to the point of the cursor on the new line, thus pushing the txt farther along in the text field and defeating the purpose... Again, If you can suggest an alternative I would be very appreciative.

Link to comment
Share on other sites

when the users hit the carrige return (or the enter Key) to start a new paragraph, it will not count as characters entered from that point to the point of the cursor on the new line,

If I understand you correctly, you want don't want to limit the number of characters in the field as much as limit the number of characters for each line in the field like a manual typewriter.

A script like this triggered by OnObjectKeystroke works mostly like a typewriter limiting typing on each line to 70 chars.

The script consists of only one line with a calculation in the Exit Script step. This only limits the last line being typed. If the user goes back and adds text to previous lines, it is not inhibited by this script.

ExitScript[

Case(

Code(Get ( TriggerKeystroke ) ) < 32 ; 1; /* Special codes are always permitted */

(PatternCount(MyTable::Description; "¶") > 0)

and

(Length(MyTable::Description) - Position ( MyTable::Description ; "¶" ; 1 ; PatternCount(MyTable::Description; "¶") ) ≥ 70); 0;

(PatternCount(MyTable::Description; "¶") = 0)

and

(Length(MyTable::Description) ≥ 70); 0;

1

)

]

Link to comment
Share on other sites

This topic is 5217 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.