October 12, 200520 yr 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
October 12, 200520 yr 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.
October 12, 200520 yr Or, without a relationship, you can define a calculated field (result timeStamp) _______________________________________ Case ( Notes = Notes ;Get ( CurrentDate ); "") _______________________________________
October 12, 200520 yr Daniele, One quick typo. It was for a timestamp, so I believe your code would be: Case ( Notes = Notes ; Get ( CurrentTimeStamp ); "")
October 12, 200520 yr Hi mr_vodka if the result is timeStamp (as I said), that isn't different... Get(CurrentDate)is the same as Get ( CurrentTimeStamp ) ;-)
October 12, 200520 yr 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 ) ; "")
October 12, 200520 yr 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?
October 12, 200520 yr I think that there isn't difference ! ( may be we have different formats of timeStamp) BTW look to the attachment Get_CurrentDate_.zip
October 12, 200520 yr 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
October 12, 200520 yr 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, 200520 yr by Guest looked the attachment
October 12, 200520 yr 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???
October 24, 200520 yr Newbies 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?
October 25, 200520 yr 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 ) ; "")
October 26, 200520 yr Newbies 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).
October 26, 200520 yr 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
November 2, 200520 yr Newbies 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.
November 2, 200520 yr 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 ; "")
Create an account or sign in to comment