Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6963 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

Or, without a relationship, you can define a calculated field (result timeStamp):)

_______________________________________

Case (

Notes = Notes ;Get ( CurrentDate );

"")

_______________________________________

Posted

Daniele,

One quick typo. It was for a timestamp, so I believe your code would be:

Case (

Notes = Notes ; Get ( CurrentTimeStamp );

"")

Posted

Hi mr_vodka

if the result is timeStamp (as I said), that isn't different...

Get(CurrentDate)is the same as Get ( CurrentTimeStamp )

;-)

Posted

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 ) ;

"")



Posted

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?

Posted

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

Posted (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 by Guest
looked the attachment
Posted

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???

  • 2 weeks later...
  • Newbies
Posted

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?

Posted

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
Posted

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).

Posted

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
Posted

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.

Posted

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 ;

"")

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.