Przejdź do głównej zawartości

GetAttachmentContent

This function returns text retrieved with OCR module from case attachments.

GetAttachmentContent();
GetAttachmentContent("attachment");
  • attachment – (String) [Optional] For which attachment text should be retireved. It can be name of attachment file, attachment template name, field name or field value. If not set, all attachments will be scanned.

This function returns String. Returns a string containing all read text or an empty string, if there was no attachment file with specified file name.

Example 1: This will return text content from all attachments and store it in ’text’ variable.

text = GetAttachmentContent();

Example 2: This will return text content from attachment named ’invoice.pdf’ and store it in ’text’ variable.

text = GetAttachmentContent("invoice.pdf");

Example 3: This will return text content from attachment form the field named ’invoice’ and store it in ’text’ variable.

text = GetAttachmentContent("invoice");

Example 4: This will return text content from attachment form the field ’invoice’ and store it in ’text’ variable.

text = GetAttachmentContent([invoice]);