titanium Posted January 14, 2010 Posted January 14, 2010 Hey. Not sure if this is the right place, but as a "learning as i go" user, i wanted to share a tip that i had to learn the hard way... I have a database setup which works great for my needs. I was trying to write a script to run on all the computers that use the database...some Mac, some XP, some Vista. All was fine until Vista. The short story is that the script would not work on Vista no matter what i did. It wasnt until i realized that my date used in my script was being pulled from a global date field, however the field type was set as TEXT, rather than DATE. This caused the formatting of the date to not jive with the rest of the fields being called in my script. So, the moral of my story is... always specify the field as the type for the data to be stored in it... TEXT for text fields, DATE for date fields, NUMBER for numbers etc. This wasnt an issue on my mac so i was lost when things didnt work on the Vista machine. Much head ache would have been avoided if i have just done it right to begin with. Happy filemaking!
lawaid Posted January 14, 2010 Posted January 14, 2010 Thanks for bringing it up, titanium! There's always time for fundamentals, and seasoned developers are not immune from making the same mistake. Along similar lines, there is a FM behavior that's caught me many times. In Define Database, if we change a field's type to a Calculation, the "Specify calculation" window will default to "Calculation result is NUMBER" ... regardless of its type before the change. I wish the new calculation could inherit the field type. In the meantime, I hope it helps someone.
Recommended Posts
This topic is 5427 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