ChangeAttachmentName
The ChangeAttachmentName() function changes the name of the attached file with the provided name to the new one.
ChangeAttachmentName(sourceFileName,newFileName);Function arguments
Dział zatytułowany „Function arguments”- sourceFileName – (String) a name of the attached file for which name is to be changed;
- newFileName – (String) a new name for the attached file.
Return value
Dział zatytułowany „Return value”The ChangeAttachmentName() function returns Boolean. Returns true if change was successful, otherwise false.
Examples
Dział zatytułowany „Examples”Example 1
Dział zatytułowany „Example 1”This will change name of ’currentName’ to ’newName’.
ChangeAttachmentName("currentName","newName");Example 2
Dział zatytułowany „Example 2”This will change name of attachment based on values stored in [currName] and [newName] variables.
ChangeAttachmentName([currName], [newName]);Example 3
Dział zatytułowany „Example 3”This will change name of ’doc_template.docx’ to ’ClientNameValue_info.docx’. (ClientNameValue is the value stored in [ClientName] variable).
ChangeAttachmentName("doc_template.docx",[ClientName]+"_info.docx");