Skip 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.

... invalid date field needs a 'trap'

Featured Replies

My app runs really well except for this problem:

There are 2 date fields:

startdate

enddate

There is a portal field called TransactionDate

There is a FIND button that searches the appropriate table for a TransactionDAte range produced but the input startdate...enddate. This works.

However, [color:blue]if a user accidentally clicks inside the date field before clicking the 'down arrow' to produce the calendar, even though he clicks a calendar date FM produces this error:

[color:red]"The value of this field must be a valid date in the range of years 1 to 4000 and should look like "12/23/2003".

Question: It seems like there should be a way to trap for this error message and revert the field.

Do you know of a way?

Thanks

  • Author

Here is another anomoly: When I ENTER a 'trash'

value (AS IN 33a) into the date field, it adds ?

to the table record where the pointer is ... huh?

See below:

ishot-332-full;init:.jpg

This is the script that is run.

a) if I enter 'trash' in the date field, it does

NOT enter ENTER FOUND Mode[] and when it

encoutners Set Field, it adds ? to the table

record... ?

ishot-333-full;init:.jpg

Surely I am missing something.... Can you help?

Thanks

R

Edited by Guest
new information and pictures

  • Author

.. ie, 'force' the user to use the drop down date menu.

I have discovered a HUGE problem. I have a date field. If the user enters '3g' for example, in the date field and I TRAP for get(lastErrorMessAGE) it returns 0 (none).

It seems that to avoid the dreaded 'revert field' and 'ok' system messages I have to do a LOT of manual programming. Or, is there an easier way?

The easiest solution I know would be to 'force' the user to use the drop down calendar. But, that begs the question [color:red]"How do I exlcude manual input by just typing into the input field?

Or perhaps the answer is "you can't do that"???

Thanks

Please do NOT double-post:

http://www.fmforums.com/forum/showtopic.php?tid/210415/

  • Author

I don't think this IS a double post. The problem in this situation centers around trying to find a way to limit the user's input to the popup calendar.

The other (admittedly similar) situation had to do with related table field corruption.

I will try and be more specific and clear.

I will add something as well as why double posting is shunned upon. It makes it hard for readers to completely follow the whole picture if its been pieced together in a bunch of posts.

It makes it hard for readers to completely follow the whole picture if its been pieced together in a bunch of posts.

Indeed and even inside a single thread, let be frank here no-one can answer even in vicinity of a subjects core, without a concise declaration of context and purpose right from the beginning of the thead, any attempts to patch up during the course is often failing.

I would say when a question is supposed to look "Learned" is it actually giving the provider more away ... don't beat around the bush, the likeliness of accidentally revealing the inner secrets of a clients business model, could perhaps seem like a danger ... but then again is it pretty usual that the inner efficiency in a business has a lot lower priority than the outer ditto.

Perhaps havn't you seen this yet, but often do businesses rely on the old saying "If it aint broke..." and we the developers on the other side, often are too biased in our view of what should be done and not. Far more IT projects flunk than survive, simply because the "Champions" who hire you to a project havn't asked neither the sponsor or the users what they think about actual changes to the business model.

http://www.ustream.tv/recorded/1816660

So what you reveal is often nowhere close to what actually is going on ... your development could easily be based purely on hearsays and fixed ideas that doesn't work at all.

--sd

Edited by Guest

  • Author

Wow. 7 replies and not a single 'answer'. I am guessing that there is no way to prevent a user form accessing a popup date field and typing in a date; ie, 1-1-2009 instead of using the popup.

Your previous behaviour could have made many turn on "Ignore" ...however a way to accomplish what you might be after is to allow only the use of the button with the tiny calendar icon.

--sd

preventIllegalDates.zip

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.