Solved

Set max amount of characters

Posted on 2011-09-14
11
536 Views
Last Modified: 2012-05-12
I like to be able to set a max number of characters on a txt field.
I tried and it still continue to allow me to enter more characters field setup txt field
0
Comment
Question by:noad
  • 6
  • 5
11 Comments
 
LVL 9

Expert Comment

by:jvaldes
ID: 36541327
The choice you made will generate an error but you have to trap the error in order to provide feedback to your user. If you want to notify the user of the error put a check in the validation criteria, ,"Display custom message if validation fails" the message that you put in the box will be displayed in a dialog if the user exceeds the character count. In order to provide as you type feedback you will have to write a custom function that you trigger every character that is entered where you compute the length of the entry so far and provide the user a dialog if he exceeds the limit.
0
 
LVL 1

Author Comment

by:noad
ID: 36542000
OK,

I'm doing it all wrong, I just want to be able to  allow only a fix number of characters in a note field. In other words when  you start to type in the notes field, I only want the user to be able to type in a max of 500 characters. How can I do that?
0
 
LVL 9

Expert Comment

by:jvaldes
ID: 36542262
Use a script trigger like 'OnObjectkeystroke" to trigger a script like the one below. This is just conceptual. you need to do the coding for the handling and clearing of the value of $$number and some other coding to make it do what you may want but this should give you enough direction to get you going...
character-count.tiff
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 1

Author Comment

by:noad
ID: 36557250
Honestly...

Very new at this, I have no clue what you are talking about.
But thanks
0
 
LVL 9

Expert Comment

by:jvaldes
ID: 36558052
Script triggers are triggers you can attach to a field, note that if you right click a field you will see an item on the drop down called script triggers, if you choose that you can select the kind of trigger you want to use to trigger the script and then you can create a script that does what you want  and I have sent you....

Ask anything else you want
0
 
LVL 9

Expert Comment

by:jvaldes
ID: 36558059
By choosing a script trigger that triggers every key you can create a script that will stop you as you are typing, If you choose a script trigger that triggers when you exit a field you can write a script that tells the user there are too many keystrokes in the field...
0
 
LVL 1

Author Comment

by:noad
ID: 36559205
Ahhhhh....

I get it!
OK,
I did what you said and it works!, but when I delete or create another record as soon as I start to type it comes up with the message I gave it " you have reached your Character Limit.
So my concern is, if while someone is type they reach the limit an want to delete to rewrite, the message will still come up or when a new record is created the same message will continue to come up.
Can this be fixed?
0
 
LVL 9

Accepted Solution

by:
jvaldes earned 500 total points
ID: 36560699
Put in a script that clears the count when you exit the field, using the field exit script trigger or check for a backspace keystroke and decrement the counter...
0
 
LVL 1

Author Comment

by:noad
ID: 36561998
Understand what you mean
No idea how up do it
Will look into it
Thank for all of tour help! :-)
0
 
LVL 1

Author Closing Comment

by:noad
ID: 36565803
Very helpful
Very simp,e explanation
0
 
LVL 1

Author Comment

by:noad
ID: 36566931
jvaldes

I have no idea on how to make it reset if I try to delete characters that are already typed in.
Can you help me with this?
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exporting data from FileMaker Pro 7.5 6 320
Filemaker 13 Export / Import Records 1 1,008
FM - Formatting Merge Fields 4 570
Error during copy and paste 3 97
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question