<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>File upload integer to link</title><link>https://community.appian.com/discussions/f/general/19920/file-upload-integer-to-link</link><description>Hi Team, 
 When using file upload I am saving the data in the database like: 
 a!fileUploadField( label: &amp;quot;Attach files&amp;quot;, labelPosition: &amp;quot;ABOVE&amp;quot;, target:cons!MPPCONSFLDR_SAMDocuments, maxSelections: 1, value:fv!item.documentid, saveInto: {ri!item.documentid</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: File upload integer to link</title><link>https://community.appian.com/thread/77843?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2020 15:28:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ac589a09-d56b-495d-b528-b8d17a0f5e97</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;As Chris already mentioned - your double save won&amp;#39;t actually do anything, because the uploaded document ID will be cast to whatever type &amp;quot;&lt;em&gt;&lt;strong&gt;ri!item.documentid&lt;/strong&gt;&lt;/em&gt;&amp;quot; is, whether it be integer or document, regardless of how you execute the save.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: File upload integer to link</title><link>https://community.appian.com/thread/77837?ContentTypeID=1</link><pubDate>Fri, 13 Nov 2020 14:36:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6b254e24-1d45-445d-9ad9-ae9af63c4fce</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;You can use the document ID to generate a download link, see an example below.&amp;nbsp; Storing the document ID as you are doing above (vs a link) is the way to go. Quick note, your saveInto expressions above are redundant here although they will not cause any issues.&lt;/p&gt;
&lt;p&gt;Replace the constant value here in local!doc with your a!queryEntity() to retrieve the document ID:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;a!localVariables(
  local!doc: cons!YOUR_DOC_ID,

  a!linkField(
    label: &amp;quot;Download Link&amp;quot;,
    links: a!documentDownloadLink(
      document: local!doc,
      label: document(local!doc,&amp;quot;name&amp;quot;)
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>