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

my client would like to have a mask for date entry, either 0216 (month, day, current year) or 02sep (day, abrv month name to number)

when I just try a simple mask on a date field it fails, so the first question is it possible to mask a date entry.

second question if possible here is what I have.

/*

Let ( [

num = Filter ( Lower(dte) ; "abcdefghijklmonpqrstuvwxyz" ) ;

txt = Filter (dte ; "0123456789")] ;

Case (

IsValid ( dte ) ; dte ; // Is entry in valid date format?

Length ( txt) = 0 ; Date ( Left (dte ; 2) ; Right (dte ; 2) ; promoYr ) ;

Length ( txt) > 0 ; Date ( Substitute (Right ( dte ; 3) ; ["jan" ; 1] ; ["feb" ; 2] ; ["mar" ; 3] ; ["apr" ; 4] ; ["may" ; 5] ; ["jun" ; 6] ; ["jul" ; 7] ; ["aug" ; 8] ; ["sep" ; 9] ; ["oct" ; 10] ; ["nov" ; 11] ; ["dec" ; 12]) ; Left (dte; 2) ; promoYr);

dte ))

*/

In layout mode, select the field, and choose Date... from the Format menu. All the options are there.

  • Author

thank comment, It is more of a question about creating different options for user entry. The user would like to only type four digits (month and day) or type a day and the abbreviated month. Then the mask would convert it to a propper format for entry.

Sorry - missed the point about entry.

First, if you only enter the day and the month (or vice-versa, depending on your settings), separated by a slash (or your chosen delimiter, depending on your settings again), Filemaker will accept it as a valid entry in the current year.

AFAIK, it is not possible to enable entry without a delimiter directly into a date field: date validation precedes auto-entry.

You could make the user enter the data into a text field, and make the date field depend on that. But such entry must follow much stricter rules: With a delimiter, 1/11 in a DD/MM/YYYY setting is clearly Nov 1. Without a delimiter, it has to be 0111 in order to be disambiguous.

However, if your user insists, you could make the date field auto-enter (replace) something like this:

Let ( [

mmdd = Filter ( DateEntry ; "0123456789") ;

string = "janfebmaraprmayjunjulaugsepoctnovdec" ;

mmm = Filter ( DateEntry ; string ) ;

m = Div ( Position ( string ; mmm ; 1 ; 1 ) ; 3 ) + 1

] ;

Case (

Length ( mmm ) = 3 ;

Date ( m ; mmdd ; Year ( Get (CurrentDate) ) ) ;

Length ( mmdd ) = 4 ;

Date ( Left ( mmdd ; 2 ) ; Right ( mmdd ; 2 ) ; Year ( Get (CurrentDate) ) )

)

)

  • Author

thanks comment that helps.

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.