Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

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

  • 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

  • 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

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.

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

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.