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.
AddFileToList(variableName, attachmentName|content, fileName);
- 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.
This function always returns true.
A file from the „Invoice” field on the case form will be added to the list.
A file from the „Invoice” field on the case form will be added to the list with „invoice.pdf” name.
Creates a text file with the content from „XML” field on the form and adds it to the list with „file.xml” name.