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.

Controlling how data is entered in a field

Featured Replies

Is there something similar to the Access "input mask" in FM??

I have a date field, and would like to display dd/mm/yyyy while the field is null or empty but enable the user to type a date without the need to type the " - " or the " / ".

Microsoft Access has something called input mask(to control how data is entered and stored)which is different then field format(to control how data is displayed), is there such a thing in FM

Thanks for the help

--Dan

There are 3 ways to accomplish what you want to do.

The first is to simply format the display of the data on the layout. For most date, times and numbers this is fine. Select the field on the layout, goto the Format menu and you will see the various options.

The second is to define a calculation field as a format mask for the field. This is a good option for things like phone numbers. An example might be: Left(Number, 3) & ")" & " " & Middle(Number, 4, 3) & "-" & Middle(Number, 7, 4), Number ). This will take a number like 1234567890 and format is as (123) 456-7890, now you can use this formatted number on your layouts and reports. I also have a really complex version which will strip out all characters other than numbers and format it as above.

The final and most complex option uses a set of fields to actually reformt the data entry to be in the correct format. It will actually take the data that was entered and turn it into the specified format. I have personally never encounted the need for this. See John Mark Osbourne's databasepros website for this trick.

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.