|
WriteNote() 
Changes the contents of a note pad.
Syntax
WriteNote(<cTable>, <cNotepad>,
<cNotes>) --> lSuccess
Arguments
<cTable> --> is the name of the database
that contains the note pad.
<cNotePad> --> is the name of the note
pad to write to.
<cNotes> --> Is the text string to store
in the note pad.
Returns
Logical TRUE is returned if writing to the
database's note pad was successful. Otherwise logical FALSE if the
write attempt failed.
Description
This function is used to write information to a
selected CAPITAL note pad. Any information held in the note pad is
replaced with the contents of cNotes.
Not all databases have note pads. These may be
used:
|
cTable Value
|
Database
|
|
CUSTREC
|
Customer
database
|
|
SUPPLIER
|
Supplier
database
|
|
SMJOBS
|
Service
Manager
|
|
HIJOBS
|
Hire
Manager
|
|
1-8 character
code
|
Must match an
existing card file
|
|
STOCK
|
Stock control notes. If importing into the stock
control record table, the note pad name does not need to be
specified.
|
The note pad name <cNotepad> must exist in
the specified database.
Example #1
The following script stores the value of cNotes
in the note pad called "Schedule" within the card file database
"Docket":
WriteNote("Docket",
"Schedule", cNotes)
Example #2
* Import Notes into
stock file
* Assumes a two column
CSV file: code, notes
* and file name
TASTE.CSV
* Create a database
table containing two fields that
* will hold the
contents of the ASCII file
Declare Flds Type
Array
Declare Typs Type
Array
Declare Lens Type
Array
Declare Decs Type
Array
Flds := { "PCODE",
"NOTES" }
Typs := { "C", "C"
}
Lens := { 25, 500
}
Decs := { 0, 0
}
CreateTable("Temp",
Flds, Typs, Lens, Decs)
* Now import the ASCII
text file
ImportASCII("Temp",
PathData() + "taste.csv", "DEL")
OpenTable("Temp")
Temp->(GotoTop())
:Loop
If
.Not. IsEmpty(Temp->Pcode)
If
Stock->(Find(Temp->Pcode))
WriteNote("STOCK",,
Temp->Notes)
Endif
Endif
If
Temp->(Skip())
Goto Loop
Endif
Echo("Notes
imported.")
____________________________
Related Topics
Business
Function List
ReadNote()
|