@DetachOSFileFromNote
Syntax
@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;TEXT1);
@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;TEXTLIST1);
@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;FN1);
@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;FNLIST1);
Description
Deletes one or more files from the document with NOTEHANDLE NOTEHANDLE1 whose file name(s) are specified in TEXT/TEXTLIST TEXT1/TEXTLIST1 or whose list position numbers (@AttachmentInfo) are specified in FN/FNLIST FN1/FNLIST1.
The @Function returns a NUMBERLIST in which the elements corresponding to the list of file attachments to be deleted (TEXT1/TEXTLIST1/FN1/FNLIST1) are set to 1 if the file attachment could be deleted, or to 0 if it could not be deleted.
With TD SINCE1, a date/time value can be specified indicating from which file creation time onward a file attachment is to be deleted.
If a file is to be deleted regardless of this, the date/time value returned by @AnyAllDay must be used.
SINCE1 cannot be a time alone; it must include a date
(Not [10:30:50], but [10.10.92 10:30:50] or [10.10.92].)
Example: @DetachOSFileFromNote(NOTEHANDLE1;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);
SINCE1:=@AnyAllDay;
TEXT1:="FILE1.TST";
AttRetList:=@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;TEXT1);
NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);
The file attachment "FILE1.TST" is deleted from the document with the NOTEHANDLE NOTEHANDLE1, if possible.
If the file "FILE1.TST" could be deleted from the document with the NOTEHANDLE NOTEHANDLE1, the result in AttRetList is 1; otherwise, it is 0.
The creation date of the file was not taken into account (SINCE1:=@AnyAllDay).
Example: @DetachOSFileFromNote(NOTEHANDLE1;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);
SINCE1:=@AnyAllDay;
TEXTLIST1:="FILE1.TST":"FILE2.TST";
AttRetList:=@AttachOSFileToNote(NOTEHANDLE1;SINCE1;TEXTLIST1);
NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);
If possible, the file attachments "FILE1.TST" and "FILE2.TST" are deleted from the document with the NOTEHANDLE NOTEHANDLE1.
If both files could be deleted from the document with the NOTEHANDLE NOTEHANDLE1, AttRetList contains 1:1; otherwise, it contains 0:0.
If only "FILE2.TST" could be deleted, AttRetList would contain 0:1.
If only "FILE1.TST" could be deleted, AttRetList would contain 1:0.
The file creation dates are not considered (SINCE1:=@AnyAllDay).
Example: @DetachOSFileFromNote(NOTEHANDLE1;SINCE1;FN1)
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);
SINCE1:=[23.10.93 00:00:00];
FN1:=1;
AttRetList:=@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;FN1);
NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);
If possible, the file attachment at position 1 (see @AttachmentInfo) is deleted from the document with the NOTEHANDLE NOTEHANDLE1.
If the attachment at that position could be deleted, AttRetList contains 1; otherwise, it contains 0.
The file creation date is taken into account. The file attachment is only deleted if the file was created after 23.10.93 00:00:00.
Example: @DetachOSFileFromNote(NOTEHANDLE1;SINCE1;FNLIST1)
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);
SINCE1:=@AnyAllDay;
FNLIST1:=1:3;
AttRetList:=@DetachOSFileFromNote(NOTEHANDLE1;SINCE1;FN1);
NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE1:=@CloseView(VIEWHANDLE1);
DBHANDLE1:=@CloseDB(DBHANDLE1);
The files are deleted, if possible, mit den Positionen 1 und 3 from the document with NOTEHANDLE NOTEHANDLE1 deleted.
Wenn es möglich war die Files mit den Positionen 1 und 3 from the document with NOTEHANDLE NOTEHANDLE1 zu löschen, ist das Ergebnis in AttRetList 1:1, sonst 0:0.
War es nur möglich das File mit der Position 3 from the document with NOTEHANDLE NOTEHANDLE1 zu löschen wäre das Ergebnis in AttRetList 0:1.
War es nur möglich das File mit der Position 1 from the document with NOTEHANDLE NOTEHANDLE1 zu löschen wäre das Ergebnis in AttRetList 1:0.
The creation dates of the files are not considered (SINCE1:=@AnyAllDay).
Note : This text was machine-translated and may contain inaccuracies.
