Print

AddFileToList

AddFileToList() function creates a list of files. A variable representing the list has to been initialized before calling this function (see examples). Then that list of files may be used to create ZIP file.

Syntax

AddFileToList(variableName, attachmentName|content, fileName);

Arguments

  • variableName – (FileList) a name of a variable used to store the list of files;
  • attachmentName – (String) a name of an attachment (from the case attachment list) or document-type field to add to the list;
  • content – (String) a content of a text field;
  • fileName – (String) a name of a file that will be added to the list.

Return Value

This function always returns true.

Type: Boolean.

Examples

Example 1:

list="";
AddFileToList(list,"Invoice");

A file from the „Invoice” field on the case form will be added to the list.


Example 2:

list="";
AddFileToList(list,"Invoice","invoice.pdf");

A file from the „Invoice” field on the case form will be added to the list with „invoice.pdf” name.


Example 3:

list="";
AddFileToList(list,[XML],"file.xml");

Creates a text file with the content from „XML” field on the form and adds it to the list with „file.xml” name.

Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?