Function EN Version 2.00

@AttachOSFileToNote

Attachments Note OSFile

Syntax

@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXT1);
@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXTLIST1);
@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXT1;TEXT2);
@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXTLIST1;TEXTLIST2);

Description

Attaches to the document with the NOTEHANDLE NOTEHANDLE1 the files whose OSPATH(s) are specified in the TEXT/TEXTLISTE TEXT1/TEXTLIST1.
If a TEXT/TEXTLIST TEXT2/TEXTLIST2 is specified, the file attachments are named after it.
The @Function returns a NUMBERLIST whose elements, analogous to the list of files to be attached (TEXT1/TEXTLIST1)
are set to 1 if the file could be attached, or to 0 if it could not be attached.
If TEXT2/TEXTLIST2 is not specified, the name of the attached file is used as the file attachment name without path and device information (e.g. C:\TESTDAT\FILE1.TST -> FILE1.TST).

With the TEXT OPTIONS1 you can specify options for attaching the files:
H=Kompression Huffman (default)
N=Keine Kompression

With the TD SINCE1 you can specify a time value from which file creation time a file should be attached.
If a file should be attached regardless of this, the time value returned by @AnyAllDay must be used.
SINCE1 cannot be just a time; it must include a date
(So not [10:30:50], but [10.10.92 10:30:50] or [10.10.92]).

Example: @AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXT1)

DBHANDLE1:=@OpenDB("TEST.NSF");
VIEWHANDLE1:=@OpenView(DBHANDLE1;"TEST VIEW");
VIEWPOSITION1:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE1:=@OpenNoteByPosition(DBHANDLE1;VIEWHANDLE1;VIEWPOSITION1;NOTEHANDLE1);

OPTIONS1:="N";
SINCE1:=@AnyAllDay;
TEXT1:="C:\\FILE1.TST";
AttRetList:=@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXT1);

NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The file C:\FILE1.TST is attached, if possible, as FILE1.TST to the document with the NOTEHANDLE NOTEHANDLE1 is attached.
If it was possible to attach the file C:\FILE1.TST to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList is 1, otherwise 0.
The file was attached uncompressed (OPTIONS1:="N").
The creation date of the file was not taken into account (SINCE1:=@AnyAllDay).

Example: @AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXTLIST1)

DBHANDLE1:=@OpenDB("TEST.NSF");
VIEWHANDLE1:=@OpenView(DBHANDLE1;"TEST VIEW");
VIEWPOSITION1:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE1:=@OpenNoteByPosition(DBHANDLE1;VIEWHANDLE1;VIEWPOSITION1;NOTEHANDLE1);

OPTIONS1:="N";
SINCE1:=@AnyAllDay;
TEXTLIST1:="C:\\FILE1.TST":"D:\\FILE2.TST";
AttRetList:=@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXTLIST1);

NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The files C:\FILE1.TST and D:\FILE2.TST are attached, if possible, as FILE1.TST and FILE2.TST to the document with the NOTEHANDLE NOTEHANDLE1 is attached.
If it was possible to attach the files C:\FILE1.TST and D:\FILE2.TST to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList is 1:1, otherwise 0:0.
If only the file D:\FILE2.TST could be attached to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList would be 0:1.
If only the file C:\FILE1.TST could be attached to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList would be 1:0.
The files are attached uncompressed (OPTIONS1:="N").
The creation dates of the files are not taken into account (SINCE1:=@AnyAllDay).

Example: @AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXT1;TEXT2)

DBHANDLE1:=@OpenDB("TEST.NSF");
VIEWHANDLE1:=@OpenView(DBHANDLE1;"TEST VIEW");
VIEWPOSITION1:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE1:=@OpenNoteByPosition(DBHANDLE1;VIEWHANDLE1;VIEWPOSITION1;NOTEHANDLE1);

OPTIONS1:="H";
SINCE1:=[10.10.92];
TEXT1:="C:\\FILE1.TST";
TEXT2:="ATTACH1.TST";
AttRetList:=@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXT1;TEXT2);

NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The file C:\FILE1.TST is attached, if possible, as ATTACH1.TST to the document with the NOTEHANDLE NOTEHANDLE1 is attached.
If it was possible to attach the file C:\FILE1.TST to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList is 1, otherwise 0.
The file is attached compressed using Huffman coding (OPTIONS1:="H").
The file is attached only if it was created or modified after 10.10.92 (SINCE1:=[10.10.92]).

Example: @AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXTLIST1;TEXTLIST2)

DBHANDLE1:=@OpenDB("TEST.NSF");
VIEWHANDLE1:=@OpenView(DBHANDLE1;"TEST VIEW");
VIEWPOSITION1:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE1:=@OpenNoteByPosition(DBHANDLE1;VIEWHANDLE1;VIEWPOSITION1;NOTEHANDLE1);

OPTIONS1:="N";
SINCE1:=@AnyAllDay;
TEXTLIST1:="C:\\FILE1.TST":"D:\\FILE2.TST";
TEXTLIST2:="ATTACH1.TST":"ATTACH2.TST";
AttRetList:=@AttachOSFileToNote(NOTEHANDLE1;OPTIONS1;SINCE1;TEXTLIST1;TEXTLIST2);

NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The files C:\FILE1.TST and D:\FILE2.TST are attached, if possible, as ATTACH1.TST and ATTACH2.TST to the document with the NOTEHANDLE NOTEHANDLE1 is attached.
If it was possible to attach the files C:\FILE1.TST and D:\FILE2.TST to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList is 1:1, otherwise 0:0.
If only the file D:\FILE2.TST could be attached to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList would be 0:1.
If only the file C:\FILE1.TST could be attached to the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList would be 1:0.
The files are attached uncompressed (OPTIONS1:="N").
The creation dates of the files are not taken into account (SINCE1:=@AnyAllDay).

Note : This text was machine-translated and may contain inaccuracies.