<?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>create folder to send documents</title><link>https://community.appian.com/discussions/f/plug-ins/39167/create-folder-to-send-documents</link><description>Hi All, 
 Please advise how do I write a Query rule to fetch case Id and folder id from database ? 
 Below is the query rule I&amp;#39;ve written to fetch the case Ids and folder Ids from database. How do I map this to a process Model? 
 a!queryEntity_22r2( entity</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create a Folder in SFTP and then push all the documents in this SFTP folder that are in the folderID location in Appian.</title><link>https://community.appian.com/thread/148453?ContentTypeID=1</link><pubDate>Wed, 28 May 2025 13:15:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:002a257e-3b48-4c2d-a2f2-9d05a06b984e</guid><dc:creator>SRINIVAS M</dc:creator><description>&lt;p&gt;Yes, create a Script Task before the SFTP Create Folder node to build pv!sftpFolderName using:&lt;br /&gt;&amp;quot;clientname_&amp;quot; &amp;amp; pv!caseId&lt;br /&gt;Then pass pv!sftpFolderName to the remoteDirectoryPath input of the SFTP Create Folder smart service.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a Folder in SFTP and then push all the documents in this SFTP folder that are in the folderID location in Appian.</title><link>https://community.appian.com/thread/148440?ContentTypeID=1</link><pubDate>Wed, 28 May 2025 05:46:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:45d18a21-89a0-4a3c-a97d-4d5317e0fef6</guid><dc:creator>Dusty</dc:creator><description>&lt;p&gt;Thank you for the response &amp;nbsp;How can I create a custom name for folder that needs to be created in &amp;quot;SFTP Create Folder&amp;quot; Smart Service? Once I have the pv!folderid, do I need to create another script task and concatenate these both&amp;nbsp;&lt;code data-start="351" data-end="370"&gt;clientname_caseId&lt;/code&gt;, and save in a different output? Also, how can I pass this folder name to &amp;quot;SFTP Create Folder&amp;quot; smart service as in which configuration can this value be passed? please advise.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a Folder in SFTP and then push all the documents in this SFTP folder that are in the folderID location in Appian.</title><link>https://community.appian.com/thread/148411?ContentTypeID=1</link><pubDate>Tue, 27 May 2025 07:26:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4daf0312-a754-4395-8bae-87dac65bbdd1</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;your output is having folder id and case id both right.You can use index() to extract the folder if and case id.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your main process model call this rule and get the list of cases. then call a sub process (or start process smart service) using &lt;a href="https://docs.appian.com/suite/help/25.2/looping.html#usage-considerations"&gt;MNI&lt;/a&gt;. within this sub process you will be having one case and one folder at a time. within this sub process have the sftp smart service to send document for one case. Like wise depending on the number of cases that many sub process instances will trigger and docs will be transferred.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In above rule you have paging done as -1. See MNI usage considerations to verify if your output can reach the maximum activity instances limit permitted or else adjust the paging using loops in process model to get cases and folders in batches.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a Folder in SFTP and then push all the documents in this SFTP folder that are in the folderID location in Appian.</title><link>https://community.appian.com/thread/148410?ContentTypeID=1</link><pubDate>Tue, 27 May 2025 07:22:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f89889c9-4bdd-4c42-8b66-f079d4f3a707</guid><dc:creator>SRINIVAS M</dc:creator><description>&lt;p&gt;&lt;span style="font-family:inherit;font-size:75%;"&gt;Hi ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:75%;"&gt;Create a query rule with &lt;code data-start="86" data-end="101"&gt;doc_sent &amp;lt;&amp;gt; 1&lt;/code&gt; and call it in a Script Task to store results in &lt;code data-start="151" data-end="164"&gt;pv!caseList&lt;/code&gt; (List of CDT with &lt;code data-start="183" data-end="191"&gt;caseId&lt;/code&gt; and &lt;code data-start="196" data-end="206"&gt;folderId&lt;/code&gt;). Use a sub-process with MNI to handle one case at a time. Inside the sub-process, extract &lt;code data-start="298" data-end="306"&gt;caseId&lt;/code&gt; and &lt;code data-start="311" data-end="321"&gt;folderId&lt;/code&gt;, create an SFTP folder named &lt;code data-start="351" data-end="370"&gt;clientname_caseId&lt;/code&gt;, fetch documents using &lt;code data-start="394" data-end="435"&gt;folder(pv!folderId, &amp;quot;documentChildren&amp;quot;)&lt;/code&gt;, and upload them using SFTP Send File. After successful upload, update &lt;code data-start="507" data-end="521"&gt;doc_sent = 1&lt;/code&gt; in the database. If the list is large, avoid hitting MNI limits by using paging or batching.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a Folder in SFTP and then push all the documents in this SFTP folder that are in the folderID location in Appian.</title><link>https://community.appian.com/thread/148409?ContentTypeID=1</link><pubDate>Tue, 27 May 2025 07:16:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4433772e-b99c-446e-af48-f5e131a61524</guid><dc:creator>Dusty</dc:creator><description>&lt;p&gt;Thanks for the response &lt;a href="/members/harshas2775"&gt;Harsha Sharma&lt;/a&gt;&amp;nbsp;. And once I call this rule in the process model script task, how do I fetch the folder Id based on one case per run to pass it further to SFTP folder ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a Folder in SFTP and then push all the documents in this SFTP folder that are in the folderID location in Appian.</title><link>https://community.appian.com/thread/148408?ContentTypeID=1</link><pubDate>Tue, 27 May 2025 07:02:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3fba66a8-0348-42f3-b3b6-72936eae610f</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;In the query rule you should add a filter for&amp;nbsp;&lt;span&gt;&amp;nbsp;doc_sent &amp;lt;&amp;gt; 1. So that the rule returns all the cases whose document is not sent already.&amp;nbsp;&lt;br /&gt;Apart from this call the rule in the process model script task and store in the a pv. the pv should be of the same data type as the output returned by the rule.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>