Jscott Posted October 12, 2005 Posted October 12, 2005 I would like to take a field that contains free flowing text (Notes) populate another field with a Date and Time stamp each time when text is entered into the field. Thanks
mr_vodka Posted October 12, 2005 Posted October 12, 2005 You can have notes be in a related table and then have a field with modification timestamp. Each time the notes field is changed, the time stamp will change.
Raybaudi Posted October 12, 2005 Posted October 12, 2005 Or, without a relationship, you can define a calculated field (result timeStamp) _______________________________________ Case ( Notes = Notes ;Get ( CurrentDate ); "") _______________________________________
mr_vodka Posted October 12, 2005 Posted October 12, 2005 Daniele, One quick typo. It was for a timestamp, so I believe your code would be: Case ( Notes = Notes ; Get ( CurrentTimeStamp ); "")
Raybaudi Posted October 12, 2005 Posted October 12, 2005 Hi mr_vodka if the result is timeStamp (as I said), that isn't different... Get(CurrentDate)is the same as Get ( CurrentTimeStamp ) ;-)
Raybaudi Posted October 12, 2005 Posted October 12, 2005 If you want an "History" of maded changes, you can make a new calculated field (result text) History (better if right aligned) Case ( Notes = Notes and Notes = "" ; "" ; Notes = Notes and History = "" ; "Start: " & Get ( CurrentTimeStamp ) ; Notes = Notes ; History & "¶Modified: " & Get ( CurrentTimeStamp ) ; "")
mr_vodka Posted October 12, 2005 Posted October 12, 2005 if the result is timeStamp (as I said), that isn't different... Get(CurrentDate)is the same as Get ( CurrentTimeStamp ) ;-) I don't know if this is neccesarily correct... If I create a calculation field with a timestamp result using Get(CurrentDate), I always get the result of: 10/12/2005 12:00 AM It will always give me 12:00AM For me to accurately get the full timestamp, I must use Get (CurrentTimeStamp). Am I misunderstanding you Daniele?
Raybaudi Posted October 12, 2005 Posted October 12, 2005 I think that there isn't difference ! ( may be we have different formats of timeStamp) BTW look to the attachment Get_CurrentDate_.zip
mr_vodka Posted October 12, 2005 Posted October 12, 2005 Hmm thats very strange... In the sample you posted, the timestamp results field was: 12/10/2005 22:17:56. Looks like it worked for you. However, as soon as I changed the value in your notes field, the timestamp result changed to '12/10/2005 00:00' for me. Very strange, I wonder if its different standards for international editions??? :qwery: I am using SP2 on XP Pro 2002 Edition FileMaker 8 Advanced. I wonder if other people can recreate the same situation. This has got me curious now. We have enough international users, maybe they can chime in. I have attached your file again but with me only changing the value in the notes field. Look at the results of the timestamp field. GetCurrentDate2.zip
Raybaudi Posted October 12, 2005 Posted October 12, 2005 (edited) Before my second reply, I maded some changes to my FM7 Dev: 1) English version 2) Format time as 12 hours with AM and PM But the result was always good ( as timeStamp). I own Windows XP SP2 (as you).... Mah !! BTW: I'll use Get (CurrentTimeStamp)next time ! ;-) PS: I looked at your attachment...and soon, as I entered a new value in Notes, the timeStamp becames a right timeStamp! Edited October 12, 2005 by Guest looked the attachment
mr_vodka Posted October 12, 2005 Posted October 12, 2005 Hey Daniele, I just found the answer! What you said earlier... if the result is timeStamp (as I said), that isn't different... Get(CurrentDate)is the same as Get ( CurrentTimeStamp ) This works in FM7, but it does not work in FM8! I opened up your file in FM7 Developer, and now it does exactly what you said. Very strange. I guess its a bug fix???
Raybaudi Posted October 12, 2005 Posted October 12, 2005 Thank You for the discovery ! I was becoming a little nervous ! :
Newbies NateDrake Posted October 24, 2005 Newbies Posted October 24, 2005 Daniele and others putting in timestamp script, I'm a beginner but have been given the task of working with the database. I have fp7, and want to add this script to timestamp text entered into a field I've called comments. How do I enter this script with script editor under this field?
Newbies NateDrake Posted October 25, 2005 Newbies Posted October 25, 2005 Could you give me a quick hand please?
mr_vodka Posted October 25, 2005 Posted October 25, 2005 You can use Daniele's code with some modification. You do not need to use Script maker because you are not writing a script. You need a calculation field called history that will show the history of all changes to the 'Comments' field. That calculation for the history field will be: Case ( Comments = Comments and Comments = "" ; "" ; Comments = Comments and History = "" ; "Start: " & Get ( CurrentTimeStamp ) ; Comments = Comments ; History & "¶Modified: " & Get ( CurrentTimeStamp ) ; "")
Newbies NateDrake Posted October 26, 2005 Newbies Posted October 26, 2005 Do I link the calculation field to the comments field, and how do I add the code, to the Specify Calculation window? (sorry, but I'm a beginner).
mr_vodka Posted October 26, 2005 Posted October 26, 2005 Take a look at the file I modified of Daniele's. I would also suggest doing some of the tutorials and get some books if you are a beginner to FM. You will find some good recommended books in the books and reference section of this forum. Good luck. clearcomments.zip
Newbies NateDrake Posted November 2, 2005 Newbies Posted November 2, 2005 Thanks. can the timestamp be added right into the comment box so it appears next to each comment? Or does it have to be its own field? Thanks for the other suggestions, I do have a FM book, Learn FileMaker Pro 7 by Jonathan Stars, which seems to be pretty thorough, but doesn't really cover this topic exactly as I need it to.
mr_vodka Posted November 2, 2005 Posted November 2, 2005 Just change your formula to add the comments to it. Case ( Trim ( Lower ( comments) ) = "clear"; ""; comments = comments and comments = "" ; "" ; comments = comments and history = "" ; "Start: " & Get ( CurrentTimeStamp ) & " " & comments; comments = comments ; history & "¶Modified: " & Get ( CurrentTimeStamp ) & " " & comments ; "")
Recommended Posts
This topic is 6963 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