Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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! shocked.gif

Posted

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

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