Database Reference
In-Depth Information
--- 3/4/2014 @ 1:45 PM by Rustin Cohle ---
My life is a circle of violence and degradation, as long as I can remember.
I'm ready to tie it off.
--- 3/8/2014 @ 10:38 AM by Margaret Hart ---
Rust knew exactly who he was and there was no talking him out of it. You know
Marty's single big problem was the he never really knew himself. So he never
really knew what to want.
--- 11/1/2002 @ 11:51 AM by Martin Hart
Past a certain age, a man without a family can be a bad thing.
In this example, you create a script that helps organize the Notes field. This script adds a sep-
arator line with the date and time (plus a couple of blank lines) and leaves the insertion point
under the separator. You also create a button next to the Notes field that runs this script.
People just have to click and then type.
NOTE
As with almost every problem you ever solve with a script, there's more than one right way to get
the job done. One way is described next, and another in the box on Fewer Steps, Bigger Calcula-
tions . You may come up with a different way, and that's OK.
Before you start creating your script, think about what you need to do in sequence. Here's a
breakdown:
▪ Put the insertion point at the start (top) of the Notes field.
▪ Insert two blank lines to create some space before the previous comment.
▪ Put the insertion point back at the start, and add the separator line with the date and time.
▪ Move the insertion point below the separator line so the user can start typing.
Your next mission is to translate these plain-English steps into script steps, which you do in
the next section.
Building the Script
Switch to the Customers layout, if you're not viewing it already. Then proceed as follows:
1. Choose Scripts Manage Scripts. Create a new script called Add Note Separat-
or .
Search WWH ::




Custom Search