ReadNote() generate/enh74c.jpg


Reads the contents of a note pad.

Syntax

ReadNote(<cTable>, <cNotepad>, [cRecordKey], [cRecordKey2]) --> cNotepad

Arguments

<cTable> --> is the name of the database that contains the note pad.

<cNotePad> --> is the name of the note pad to read. You are not required to pass this parameter when accessing transaction based note pads, such as ORDERS or QUOTES.

<cRecordKey> --> is the optionally specified record key to locate. For a customer account this is the customer account code. For a supplier account this is the supplier account code. For job and hire cards this is the job number. The record key should not be specified when accessing card files. Not used when accessing transaction notes.

<cRecordKey2> --> is an optional second record key reference. This is used only with Back Order Control Centre notes when you wish to specify which line item to specifically retrieve a note for. Not used when accessing transaction notes.

Returns

The contents of the note pad or an empty string "" if the read failed.

Description

This function is used to read information from a selected CAPITAL note pad.

Not all databases have note pads. These may be used:

cTable Value

Transaction

Database

CUSTREC

No

Customer database

SUPPLIER

No

Supplier database

SMJOBS

No

Service Manager

HIJOBS

No

Hire Manager

BONOTES

No

Back Order Control Centre

BORDERS

Yes

Invoice or sales order database depending on the origin of the back order

ORDERS

Yes

Sales Orders database

INVOICE

Yes

Invoicing database

SORDERS

Yes

Purchase Orders database

RETURNS

Yes

Stock Returns or Stock Receipts database

QUOTES

Yes

Quotations database

1-8 character code

No

Must match an existing card file

The note pad name <cNotepad> must exist in the specified database.

When extracting Back Order Control Centre comments/notes, specify "O" for sales orders or "I" for invoices for the note pad name. Specify the transaction number as the record key. For example:

cNotes := ReadNote("Bonotes", "O", "1005")

Example #1

The following script reads the value of the note pad "Schedule" found in the card file database "Dockets" and stores the result in the string cNotes:

cNotes := ReadNote("Docket", "Schedule")

Example #2

The following script reads the value of the note pad for the Back Order Control Centre.

cNotes := ReadNote("BONotes", Borders->Invoiceno)

This script reads it for a specific line item of a back order:

cNotes := ReadNote("BONotes", Borders->Invoiceno, Borders->Lineref)

____________________________

Related Topics:

Business Function List

WriteNote()



CAPITAL VISUAL BUILDER