Function GetNotes
Gets secure notes for a record as a string.
This functions also allows additional notes data to be added to this returned data.
GetNotes([TABLENAME],[FIELDNAME],[FIELDVALUE],[ADDBREAKER],[NOTESFIELDDATA],[SEPARATOR],[ADDFILTER])Parameters
| # | Type | Passing | Default | Name | Description/Comments | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | string | required | n/a | TABLENAME | The table name to get secure notes for | ||||||||
| 2 | string | required | n/a | FIELDNAME | The field name to get secure notes for | ||||||||
| 3 | string | required | n/a | FIELDVALUE | The key field value to get the notes for e.g. PROPCODE,CONCODE or CONREF
|
||||||||
| 4 | boolean | optional | false | ADDBREAKER | Add the separator between notes that is date/time and user who input the note | ||||||||
| 5 | string | optional | blank | NOTESFIELDDATA | Pass in an additional notes field to add to the end of this date e.g. NOTES. This may be required if there are additional notes stored in the NOTES field before secure notes were switched on and they need to be include in this returned data. | ||||||||
| 5 | string | optional | blank | SEPARATOR | Separator between secures and NOTESFIELDDATA e.g. chr(13)+chr(13) | ||||||||
| 6 | string | optional | blank | ADDFILTER | Data filter expression e.g. "SUSER='John'" |
Returns
The string required
Examples
Will get the secure notes for the NOTES against the property record for PROPCODE.
[[GetNotes("PROPERTY","NOTES",PROPCODE,.T.,"","","")]]
Will get the secure notes for the NOTES against the property record for PROPCODE and add the NOTES field data too.
[[GetNotes("PROPERTY","NOTES",PROPCODE,.T.,NOTES,chr(13)+chr(13),"")]]
Will get the secure notes for the Deal Notes against the property record for PROPCODE.
[[GetNotes("PROPERTY","DEALNOTE",PROPCODE,.T.,"","","")]]
Will get the secure notes for the diary event against the event record for CONREF and will filter to just user John.
[[GetNotes("DIARY","NOTES2",CONREF,.T."","","SUSER='John'")]]
Will get the secure notes for the NOTES against the property record for PROPCODE and convert carriage returns to HTML breaks.
[[StringToBrFromChr(GetNotes("PROPERTY","NOTES",PROPCODE,.T.,"","",""),"")]]
