Set Field [ Table::NotesField ; Get(TimeStamp) & ¶¶ & Table::NotesField]
Will put the current time stamp and two hard returns at the beginning of your field.
Set Selection can be used to put the cursor at a specific point in this field.
Wouldn't it work better to put your notes field in a portal were adding a new note simplly means adding a new related "notes" record? Then your time stamp can simply be an auto-entered timestamp in a second field in this related table--no scripting required.
Phil, you are easily beyond my knowledge level. This sounds good but this is new to me so I need a little more help in understanding how to do this.
If possible can you tell me the steps and then I can go experiment. My level is low but coming up pretty fast.
I am reading about portals now. I have used them but only to open a portal to Google maps.
Is the Get function a part of the Set Field dialogue box?
I can enter the Set Field command but I do not see how to set up the Get(TimeStamp) & ¶¶ & Table::NotesField] part of this.
I got the Get(TimeStamp) & ¶¶ & Table::NotesField] part.
I got that far
Set Selection [Table::NotesField ; Start Position: 0 ; End Position: 0 ]
Will place the cursor at the beginnig of the Notes field.
Please keep in mind that a portal of individual notes may be a much better approach than the above scripting.
Yes I am just trying to understand everything.
I am researching Portals now to start to figure out how to do what you are suggesting.
I also agree that using a portal with related notes records is probably the best way to go.
That being said, to answer your orig question you could do the following script which Phil has given you the pieces on:
Insert Calculated Result [ Select; YourNotesField; "¶¶¶" & YourNotesField ]
Set Selection [ Start Position: 1 ]
Insert Calculated Result [ Get ( CurrentTimeStamp ) & " - " ]
Edit - P.S. Wasn't sure if you wanted 2 lines in between each entry or 1.
I was able to do this and kludge together my first working script to do this. I am going to work on Portals tonight.
Is there a quick way to turn the font color to red before I put in the timestamp?
Take a look at teh Text Formatting functions such as TextColor and TextColorRemove.