<?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>Saving pdf id to table.</title><link>https://community.appian.com/discussions/f/general/25687/saving-pdf-id-to-table</link><description>We are trying to understand how to upload a pdf into a folder and save the id in table to be retrieved later. We are not able to get the id to return and then save it. We have a response json and we can&amp;#39;t just hardcode from the uploadfield. in the component</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Saving pdf id to table.</title><link>https://community.appian.com/thread/100454?ContentTypeID=1</link><pubDate>Sat, 03 Sep 2022 04:58:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:25ab6851-a5d1-4015-ae4b-81fdea9ba2fa</guid><dc:creator>deepakg271869</dc:creator><description>&lt;p&gt;You can use FileUploadField component to upload the file and use a ruleInput variable which will handle your document id. Once you upload the document there will a button which will help you to submit the form and on saveinto of that button you can use writetodatastoreEntity and save the id into Db and use that id in future to get the document for the particular id. For more details, I am attaching the code below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1662180934660v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On click of submit button, The highlighted ID will store into DB and by using this ID you can fetch the document as well.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
  a!fileUploadField(
    label: &amp;quot;Upload Document&amp;quot;,
    target: tofolder(25436),/*use your folder id*/
    value: ri!documentID,
    saveInto: ri!documentID
  ),
  a!buttonLayout(
    primaryButtons: {
      a!buttonWidget(
        label: &amp;quot;Submit&amp;quot;,
        submit: true(),
        saveInto: {
        /*Change the below function according to your requirement*/
          a!writeToDataStoreEntity(
            dataStoreEntity: cons!UAS_DSE,
            valueToStore: &amp;#39;type!{urn:com:appian:types:UAC}UAC_UAS_Onboard_Data&amp;#39;(assettype: ri!documentID)
          )
        }
      )
    }
  )
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note: It will work only on process start form or user input task. File upload field will not work any other places.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving pdf id to table.</title><link>https://community.appian.com/thread/100452?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2022 20:34:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e653fd3a-29af-4066-bbed-0d7ff2641bd9</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I&amp;#39;m a little fuzzy on your use case, but if you are trying to get the ID of a document from a!fileUploadField() where it is being selected on an interface, the form will need to be submitted to turn it into a document object before you can retrieve the ID, then you can use&amp;nbsp;&lt;em&gt;&lt;strong&gt;=document(pv!document,&amp;quot;id&amp;quot;)&lt;/strong&gt;&lt;/em&gt; in a script task, etc.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;A common solution is to add a button which submits the form (this creating the document object), and chains back to itself, giving the user the impression that they never left the form.&lt;/p&gt;
&lt;p&gt;Otherwise, please share a little more details on your use case, code, things you have tried etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>