<?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>How to check if folder already exists from process model?</title><link>https://community.appian.com/discussions/f/general/17895/how-to-check-if-folder-already-exists-from-process-model</link><description>Hi guys, 
 I&amp;#39;ve got a process model that creates a folder and generates a text document that it then stores in this folder. Our application uses workflows, and the folders will be created with the workflow ID. 
 However, this process model may be run</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to check if folder already exists from process model?</title><link>https://community.appian.com/thread/92473?ContentTypeID=1</link><pubDate>Sat, 19 Mar 2022 17:50:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a16bed06-0acf-4d1c-a760-710763e21fde</guid><dc:creator>gaddamv0001</dc:creator><description>&lt;p&gt;I have a small&amp;nbsp; doubt here , so you mean when folder is created through process model , you find the respective&amp;nbsp; folder id , and save this folder id in the folder ID in the CDT .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is what i understood , is my understanding right ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if folder already exists from process model?</title><link>https://community.appian.com/thread/70435?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 18:54:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0cf27cf2-d786-4376-b649-5dcd3577c646</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;Does the Object Existence plugin also work for folders?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if folder already exists from process model?</title><link>https://community.appian.com/thread/70432?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 18:02:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16ecaf98-768f-4982-996e-1b319c28e21d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Yeah, that&amp;#39;s basically what I was getting at in my last sentence or so, though probably not as clearly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if folder already exists from process model?</title><link>https://community.appian.com/thread/70431?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 18:01:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8607ee07-f1d2-49d6-bc43-1c337b9f1a69</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;One thing I have often done is to store the folder ID as a field in your CDT - in this case, you could associate your folder ID with a given workflow in the database. Then, you can use the workflow ID to find the associated folder ID. If there&amp;#39;s already an existing folder, you don&amp;#39;t have to create a new one and can store your documents directly in that folder. If there isn&amp;#39;t an existing ID, that&amp;#39;s when you can create one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to check if folder already exists from process model?</title><link>https://community.appian.com/thread/70430?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2019 17:36:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:06ca30e0-0758-4ebc-9af2-8e31b95deb4d</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;There&amp;#39;s no requirement that folders have a unique name - though I&amp;#39;d warn against creating too many folders with identical names as it could make troubleshooting a nightmare.&lt;/p&gt;
&lt;p&gt;More to your point - off the top of my head I don&amp;#39;t remember any direct way to find a folder by name.&amp;nbsp; A workaround I&amp;#39;ve used in the past is using&amp;nbsp;a plug-in function like &amp;quot;get subfolders from folder&amp;quot; to return all children of a parent folder, then using a!forEach to iterate through them and see if any have a matching folder name.&amp;nbsp; Before doing this though, I think a much stronger solution would be to store the initial created folder ID to the database somewhere that it could be traced to your workflow ID, and just query for that workflow ID before attempting to create a new folder in any new process instances.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>