GetAttachmentContent

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

Syntax

GetAttachmentContent();
GetAttachmentContent("attachment");

Function arguments

  • 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.

Return value

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.

Examples

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]);
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.