Jump to content

Creating a Timestamped Notes Field

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

Recommended Posts

I am wanting to create a text field that makes it easy to place a timestamp on notes added to the text field. Does anyone know a good way to go about this?

If you look at the attached image, you can see what I have in mind. Upon clicking the "time" button, the field automatically returns down one line, adds the current time, and then allows you to add text.

Any help is greatly appreciated! Thanks for your time.


Link to comment
Share on other sites

I used to use the method you suggested to enter notes. Now, I store each entry in a related table, and view the notes via a web viewer. There is an example of this method here: http://sixfriedrice.com/wp/filemaker-9-tip9-web-viewers-without-the-web/ . You need to download the example file, and open notes.fp7 file.

To do what you are asking; first you need to decide if you want to add new notes to the top or the bottom. I started with adding new notes to the bottom, but quickly found that if there are many notes entered, it's difficult to see the most recent note entered. I would recommend new entries to go on the top (beginning of field). To do this, set the field with a calculation something like:

Get( CurrentHostTimeStamp ) & ": ¶¶" & YourFieldName

It would also be nice to use the "Set Selection" script step to put the cursor in the field after the timestamp, so the user can just start typing after clicking "Time".

Link to comment
Share on other sites

Thanks for the advice! That makes a lot of sense. After working on it a while, I am still not able to get the button to enter the timestamp into the field. Maybe I am in over my head, or maybe I am just missing something simple. Any way I could ask you to explain how to create that button and script a little more in detail as far as how you go through the process?

Thanks again for your time, I greatly appreciate it!

Link to comment
Share on other sites

  1. create a script
  2. add "Set Field" step
    • field to set is your notes field
    • calculation is the one from my last post

    [*]have button perform script

Once that is working; Try adding the "Set Selection" Script step to the script to put the cursor right where the user would want it to be to type a note.

(hint: find the first occurrence of "¶¶")

Link to comment
Share on other sites

Notes should be in related Notes records, so that previous notes cannot be edited or removed. This solves a whole heap of problems such as the timestamp: it can be a separate field in the related record, not some text in the note itself. You could also record the note creator and modifier information as well. Keeping them in separate fields allows the data to be easily reported on and used for searches.

Link to comment
Share on other sites

This topic is 4320 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.