JTSmith Posted September 13, 2012 Posted September 13, 2012 I have a script and it has a user input field, I'd like to be able to say "if FIELD is not in the format MM/DD/YYYY then..." Is there a way to do that? Thanks.
comment Posted September 13, 2012 Posted September 13, 2012 I believe your question is based on a false assumption. A field does not have a date format (though it can be formatted to display in a certain way). What exactly is your purpose here?
JTSmith Posted September 13, 2012 Author Posted September 13, 2012 I have a script that shows a custom dialog, and then asks for a date. The custom dialog uses a temporary field, so when you entered the date, the next steps do calculations on it between dates. My problem if someone is supposed to put 09/30/2012 in there but instead puts Sep 30, 12, it doesn't work right. Some of the script steps after are something like If ( temp field = Get(CurrentDate) then exit script, etc.
comment Posted September 13, 2012 Posted September 13, 2012 If you are not sure your users know how to input dates, your best bet is to use a field with a drop-down calendar. Note that even if you know the expected format is M/D/Y, you can't tell if an entry of "12/1/2012" is correct (December 1) or not (user meant to enter January 12).
JTSmith Posted September 13, 2012 Author Posted September 13, 2012 Ya I always use the drop-down, but I don't think you can do it with the Custom Dialog in the script can you? My Customer Dialog part has an input field that is where they need to enter the date.
Ocean West Posted September 13, 2012 Posted September 13, 2012 Use three field m/d/y and then assemble it on submit.
bruceR Posted September 13, 2012 Posted September 13, 2012 But with FileMaker 12 you have the option of presenting any layout as a dialog, using the advanced new window options. And therefore you can place any controls you want on the layout.
comment Posted September 14, 2012 Posted September 14, 2012 I don't think you can do it with the Custom Dialog in the script can you? My Customer Dialog part has an input field that is where they need to enter the date. There is something you can do with a standard custom dialog: ValidDateDialog.fp7.zip
JTSmith Posted September 14, 2012 Author Posted September 14, 2012 that worked like a charm. Thank you!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now