J__ Posted October 26, 2004 Posted October 26, 2004 Hi, I would like to display a field which contains something like [ / / ] for a date. so then all i have to do is type 102404 and the date is 10/24/04. I know I can validate this after the fact and check to see if / / are there, but what about in the field displaing slashes before the user goes in the field? thanks for your help in advance, sincererly, J__
Vaughan Posted October 26, 2004 Posted October 26, 2004 Since you are using FMP 7 you might be able to take advantage of the new autoenter calculation feature. One of the things it can do is manipulate data entered into the field.
-Queue- Posted October 26, 2004 Posted October 26, 2004 Vaughan is correct. However, your field will have to be a text field, as MMDDYY is not a valid FM date format. You can use an auto-enter calculation with 'Do not replace existing value' deselected. Left( field; 2 ) & "/" & Middle( field; 3; 2 ) & "/" & Right( field; 2 )
J__ Posted October 28, 2004 Author Posted October 28, 2004 Thanks guys, I really appreciate it. I just want a standard / / when you tab into the field. then be able to type in each section. But it does need to be a date field in the end. any additional suggestions? thanks, Sincerely, J__
-Queue- Posted October 28, 2004 Posted October 28, 2004 I think you're going to need two fields still, due to the format being invalid for a date field.
transpower Posted October 28, 2004 Posted October 28, 2004 You could auto-enter a (fake) date, like 01/01/01, and allow user-override. At least you've got a date field and the slashes...
Lee Smith Posted October 28, 2004 Posted October 28, 2004 Why not just put a button next to the field, and use the Insert Current Date Script Step? Lee
J__ Posted October 31, 2004 Author Posted October 31, 2004 thanks to all of you for the useful information. need to ponder the options a little. sincerely, J__
VFXdbGuy Posted November 1, 2004 Posted November 1, 2004 It's a lot to go through to get what you want but here's an idea. Create a text field for this data without slashes. Add it to a layout and make it editable.. Create another field as a calculation that displays the data with the slashes (that's the Left/Middle/Right equation mentioned earlier). Place this field over your original text field but do not alow entry. Now when people enter this field they will be editing the text field and just type the numbers. When they move on the data is displayed with the slashes. But if you want to use this data as a date (and, as Queue says, it is the wrong format) you'll need yet another calc field that returns a date to parse it into the right order.. I think that's the Date function...
J__ Posted November 3, 2004 Author Posted November 3, 2004 thanks for the response Grant. I appreciate it and may try it at some point. sincerely, J__
Recommended Posts
This topic is 7680 days old. Please don't post here. Open a new topic instead.
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