You are on the Xporter Cloud documentation. If you are looking for Xporter Server documentation, you can find it in this page.

Iterating Request Attachments

Because it is not known in advance how many attachments exist in a request, you can iterate a section over all the attachments of a request. This allows you to create a table that dynamically grows according to the number of existing attachments. The notation is:

Attachments FieldsDescription
IDThe ID of the attachment
NameThe name of the attachment
AuthorThe author of the attachment
AuthorFullNameThe full name of the author of the attachment
CreatedThe date the attachment was created
SizeThe size of the attachment
HumanReadableSizeThe formatted size of the attachment
MimeTypeThe type of the attachment
Expand to see the sample code
#{for attachments}
   ${Attachments[n].ID}
   ${Attachments[n].Name}
   ${Attachments[n].Author}
   ${Attachments[n].AuthorFullName}
   ${dateformat("dd-MM-yyyy HH:mm:ss"):Attachments[n].Created}
   ${Attachments[n].Size}
   ${Attachments[n].HumanReadableSize}
   ${Attachments[n].MimeType}
#{end}
 
or
 
#{for <VariableName>=AttachmentsCount}
   Content and Request Mappings. Example: ${Attachments[VariableName].Field}
#{end}

The image below demonstrates an example of a Word template that iterates over attachments.

or

The image below demonstrates an example of an Excel template that iterates over attachments.

or

Iterating Request Comments

Because it is not known in advance how many comments exist for a request, you can iterate a section over all the comments on a request. This allows you to create a table that dynamically grows according to the number of existing comments. The notation is:

Comments FieldsDescription
Author

The author of the comment

AuthorFullNameThe full name of the author of the comment
BodyThe comment
CreatedThe date the comment was posted
GroupLevelThe group level of the comment
Expand to see the sample code
#{for comments}
   ${Comments[n].Author} 
   ${Comments[n].AuthorFullName} 
   ${Comments[n].Body} 
   ${dateformat("dd-MM-yyyy HH:mm:ss"):Comments[n].Created}
   ${Comments[n].GroupLevel}
#{end}
 
or
 
#{for <VariableName>=CommentsCount}
   Content and Issue Mappings. Example: ${Comments[VariableName].Field}
#{end}


The image below demonstrates an example of a Word template that iterates over request comments.

or

For a working example of this functionality, check the SampleIterations.docx template in the Samples Page.

The image below demonstrates an example of an Excel template that iterates over issue comments.

or

  • No labels