<?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>Invalid content ID (document deleted)</title><link>https://community.appian.com/discussions/f/user-interface/25976/invalid-content-id-document-deleted</link><description>Through a form in an interface, I upload files or images and it is stored in my db as a number (I guess it&amp;#39;s the ID, image bellow). The images are stored in a folder in my KC 
 This is the expression of my fileupload 
 
 
 I deleted all the files and</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Invalid content ID (document deleted)</title><link>https://community.appian.com/thread/101681?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 13:51:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b155c93e-c3a0-4274-bc3f-3dd8e74f6d99</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;That works though as a design note, it&amp;#39;s a lot of manual work to do (and remember) if you end up with lots of places in your system where you need to do something similar.&amp;nbsp; I usually encapsulate checks like these in an easy-to-remember / easy-to-find expression rule that takes a doc / docId and returns a simple boolean output.&amp;nbsp; For instance the following, which you could name &amp;quot;rule!GLBL_docExists()&amp;quot; or similar:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;and(
  a!isNotNullOrEmpty(ri!doc),
  tointeger(ri!doc) &amp;gt; 0,
  
  isobjectexists(&amp;quot;Document&amp;quot;, ri!doc)
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note: this uses the &lt;a href="/b/appmarket/posts/check-object-existence"&gt;Check Object Existence&lt;/a&gt; plug-in, though it would only require a minor tweak to use the &lt;a href="/b/appmarket/posts/content-tools"&gt;Content Tools&lt;/a&gt; rule (as seen above) instead in a similar implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid content ID (document deleted)</title><link>https://community.appian.com/thread/101643?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 05:12:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b69bca25-611c-40cf-8df7-fb6d8236523e</guid><dc:creator>ujjwalr0002</dc:creator><description>&lt;p&gt;To handle this error you can apply a check to whether the document ID is valid or not.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!document: 46,/*ID for any document */
  local!contentData: if(
    isnull(local!document),
    null,
    getcontentobjectdetailsbyid(local!document)
  ),
  if(
    isnull(local!document),
    false(),
    and(
      not(
        exact(
          local!contentData,
          &amp;quot;No object with this ID has been found&amp;quot;
        )
      ),
      find(&amp;quot;Type: Document&amp;quot;, local!contentData)
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid content ID (document deleted)</title><link>https://community.appian.com/thread/101640?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 04:50:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:666b9b27-592b-48a8-a66f-88175d7e073c</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;As you deleted all the files and images from the KC it will show this error. To get rid of this, you have to create new instances or in the DB delete the data for file1,2 and 3 columns so that it can&amp;#39;t look for these documentId&amp;#39;s in Appian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid content ID (document deleted)</title><link>https://community.appian.com/thread/101634?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2022 03:53:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a6c32b82-6174-49d5-ace3-51bcd7a5b9e7</guid><dc:creator>shalini</dc:creator><description>&lt;p&gt;I think that error because you deleted the images in KC.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>