Please enable JavaScript to view this site.

iService Forms User Guide

Navigation: Form Commands > $Value

$Value -attachment

Scroll Prev Top Next More

The -attachment parameter is used to display attachments with find answers articles. Articles may have files attached (Excel sheets, PDF documents, etc.), and these attachments can be displayed using the -attachments parameter.

 

The syntax for the command is:

$Value -attachment(part)$ where part is the aspect of the file attachment that you want to display within the find answers article.

 

Example: Display the name of a file attached to a find answers article

$value -attachment(name)$ 

 

The options include:

(id|name|ownerid)

 

The $value -attachments command requires the use of the $IF -attachments and the $Repeat -attachments to generate the desired list of files attached to an article. A simple example of this is shown below.

 

<div>

   $if -attachments -Pid'articleID'$

      $repeat -attachments -Pid'articleID'$

         <div data-role="content"><!-- Attachment List Repeat --> 

            <div>

               //The anchor tag below generates the clickable link for loading the file with file.aspx, and the -attachment parameter displays the file name// 

               <a href="File.aspx?interactionID=$value -article(id) -Pid'articleID'$&fileID=$value -attachment(id)$" target="_blank">$value -attachment(name)$</a><br />

            </div>

         </div><!-- /Attachment List Repeat --> 

      $endrepeat$                    

   $else$

      There are no file attachments for this article.<br />

   $endif$                                

</div>