<?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>Check Object Existence</title><link>/b/appmarket/posts/check-object-existence</link><description>Overview 
 This function helps in situations where the designer or developer has to act upon an Appian object (e.g. Document, Folder, Community, Knowledge Center). Before doing any operations on the Appian object this function can be used to check whether</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Check Object Existence</title><link>https://community.appian.com/b/appmarket/posts/check-object-existence</link><pubDate>Wed, 16 Oct 2024 12:28:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2749d922-32ad-4ab6-90e9-641538d2c510</guid><dc:creator>Mike Schmitt</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Now that this plug-in has been archived, everyone should replace the functionality using the &lt;a href="/b/appmarket/posts/content-tools"&gt;Content Tools&lt;/a&gt; plug-in, namely using the &amp;quot;Get Content Object Details By Id&amp;quot; function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This function can check for the mere existence of an item at that ID, e.g.&lt;br /&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:9aca1b6b-b3f1-4dde-acee-7d9efc256139:type=java&amp;text=getcontentobjectdetailsbyid%28ri%21id%29%20%3C%3E%20%22No%20object%20with%20this%20ID%20has%20been%20found%22]&lt;/p&gt;
&lt;p&gt;but also, it can be used (in one pass) to check specifically for Document or Folder IDs, e.g.&lt;br /&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:e36b67de-b036-4ea7-93ce-d6f74902c061:type=java&amp;text=find%28%0A%20%20%22Type%3A%20Document%2C%22%2C%0A%20%20getcontentobjectdetailsbyid%28ri%21docId%29%0A%29%20%3E%200%0A%0A%2F%2A%20or...%20%2A%2F%0A%0Afind%28%0A%20%20%22Type%3A%20Folder%2C%22%2C%0A%20%20getcontentobjectdetailsbyid%28ri%21folderId%29%0A%29%20%3E%200]&lt;/p&gt;
&lt;p&gt;As always, I recommend staging your own &amp;quot;helper expression rules&amp;quot; to handle null-checks and other housekeeping at the same time as calling the rule, to facilitate re-use and code-readability.&amp;nbsp; See my &lt;a href="/b/appmarket/posts/check-object-existence?CommentId=e3ecd56c-f9bf-4525-bdf6-b9292641d1f5"&gt;slightly older comment here&lt;/a&gt; for an example recipe.&lt;/p&gt;&lt;img src="https://community.appian.com/aggbug?PostID=797&amp;AppID=50&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Check Object Existence</title><link>https://community.appian.com/b/appmarket/posts/check-object-existence</link><pubDate>Sun, 17 Jul 2022 05:34:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2749d922-32ad-4ab6-90e9-641538d2c510</guid><dc:creator>ianjesusg0002</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-2749d922-32ad-4ab6-90e9-641538d2c510/pastedimage1658036190278v1.png" alt=" " /&gt;can anyone help me with this? Thank You [emoticon:6d505171faa4497c85c5ca27290c555d]&lt;/p&gt;&lt;img src="https://community.appian.com/aggbug?PostID=797&amp;AppID=50&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Check Object Existence</title><link>https://community.appian.com/b/appmarket/posts/check-object-existence</link><pubDate>Fri, 13 May 2022 08:56:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2749d922-32ad-4ab6-90e9-641538d2c510</guid><dc:creator>Arpit Pipersaniya</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;[mention:f81052d71c6f44b99e15a76dec63b379:e9ed411860ed4f2ba0265705b8793d05]&lt;br /&gt;Is this compatible with 21.4v of Appian Cloud?&lt;br /&gt;&lt;br /&gt;Threw this error yesterday:&lt;br /&gt;&lt;span&gt;=isobjectexists(&amp;quot;Document&amp;quot;,pv!documentZIP) (Expression evaluation error at function &amp;#39;isobjectexists&amp;#39;: The passed parameter(s) are of the wrong type. Received the type com.appiancorp.common.xml.JaxbConversionException: JAXB was not able to produce a value for typed value TypedValue[it=3,v=[Document:533750]] as java class java.lang.Long.)&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;And when I checked the following manually in an unnamed ER:&amp;nbsp;&lt;br /&gt;isobjectexists(&amp;quot;Document&amp;quot;,533750)&amp;nbsp;&lt;br /&gt;Then this returns true.&lt;br /&gt;&lt;br /&gt;Any suggestions, please?&lt;br /&gt;&lt;br /&gt;Thank you.&lt;/p&gt;&lt;img src="https://community.appian.com/aggbug?PostID=797&amp;AppID=50&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Check Object Existence</title><link>https://community.appian.com/b/appmarket/posts/check-object-existence</link><pubDate>Wed, 09 Jun 2021 05:56:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2749d922-32ad-4ab6-90e9-641538d2c510</guid><dc:creator>Richard Michaelis</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Short information:&lt;br /&gt;If you check for an ID and there is no object of the defined type with this Id, it will create a log entry.&lt;br /&gt;I tried this function to search for all groupIds in a system.&lt;br /&gt;Idea was: loop and enumerate all IDs and then return the ids which are existing. yeah....&lt;/p&gt;
&lt;p&gt;-&amp;gt; I made our tomcat crash as i was creating 5 GB and more in log files because most groupIds i was checking are not in Use -&amp;gt; log entry -&amp;gt; huge log size in a short time.&lt;/p&gt;&lt;img src="https://community.appian.com/aggbug?PostID=797&amp;AppID=50&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Check Object Existence</title><link>https://community.appian.com/b/appmarket/posts/check-object-existence</link><pubDate>Thu, 20 May 2021 19:41:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2749d922-32ad-4ab6-90e9-641538d2c510</guid><dc:creator>isaace</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span&gt;thank you&amp;nbsp;so much for this plug-in! I&amp;#39;m really surprised that there isn&amp;#39;t a &amp;quot;native&amp;quot; function that does this.&amp;nbsp; Solves a major issue I&amp;#39;ve had between different environments that have duplicated tables, but not duplicated folders/documents :)&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.appian.com/aggbug?PostID=797&amp;AppID=50&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Check Object Existence</title><link>https://community.appian.com/b/appmarket/posts/check-object-existence</link><pubDate>Wed, 05 Aug 2020 16:29:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2749d922-32ad-4ab6-90e9-641538d2c510</guid><dc:creator>Mike Schmitt</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Just checking in to confirm this still apparently works fine in 20.2, and appears to be nice and snappy.&lt;/p&gt;&lt;img src="https://community.appian.com/aggbug?PostID=797&amp;AppID=50&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>