February 28, 200223 yr I have a file that I need to restrict the user to entering a certain set of characters. If they use a character outside of the set I need it to error. Is this possible in FileMaker? Thanks Brian
February 28, 200223 yr Do you want to limit the possible entries into a specific field? If this is the situation, would a value list with your pre-determined allowable entries do the job? I'm not quite sure what you are trying to achieve - please explain more. Pete
March 1, 200223 yr Author Pete, I have an embossing machine that will stamp the names of people at the bottom of books. I only have a certain number of characters on a wheel of the embosser. I want to be able to limit the end user to only use the characters that are available. The user will type their name in a field and if they use a character outside the set I have allowed them I want it to alert them. I am doing other checks via a script right now and would like to add this to the script if possible. Thanks for any help, Brian
March 1, 200223 yr Author Pete, I have an embossing machine that will stamp the names of people at the bottom of books. I only have a certain number of characters on a wheel of the embosser. I want to be able to limit the end user to only use the characters that are available. The user will type their name in a field and if they use a character outside the set I have allowed them I want it to alert them. I am doing other checks via a script right now and would like to add this to the script if possible. Thanks for any help, Brian
March 1, 200223 yr Haven't tested this: Perhaps you can validate by calculation, then use the "PatternCount" command. It's not a total solution, but it might provide a start.
March 1, 200223 yr Sounds like it should be simple, but it's a good one! Here what you need: 2 global fields, gCounter and gText. A new file, Characters, that has a text field, Character. Make a record in Characters for each legal character. In your original file, make a relation to Characters, gText::Character. Now make a script like this: Set Field (gCounter, Length(YourText)) Loop ..Exit Loop If (gCounter = 0) ..Set Field(gText, Middle(YourText, gCounter, 1)) ..If(IsValid(Characters::Character) ....Set Field (gCounter, gCounter - 1) ..Else ....Show Message ("Your strange characters frighten and confuse me. Please go away.") ....Exit Script ..End If End Loop Hey, that was fun!
March 4, 200223 yr Author Fitch, Works like a champ! I did have to add few more steps to bypass spaces. If (gtext=" ") SetField(gcounter, gcounter-1) SetField(gtext,Middle(gtext,gcounter,1) end if Thanks for the help Brian
Create an account or sign in to comment