<?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>I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/discussions/f/general/14865/i-have-a-scenario-to-save-documents-into-dynamic-folders-using-tofolder-function</link><description>Hi All, 
 I have a scenario to save documents into dynamic folders. Tried using tofolder() for which input parameter is a value which is of any type. when I try to pass folder id , it is working fine but not with the folder name. 
 In my case I need to</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/thread/66537?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 12:30:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f592a267-c934-4d93-918e-b0cb3b1246c3</guid><dc:creator>vinayp0002</dc:creator><description>&lt;p&gt;Thanks Stewart for the reply.&lt;br /&gt;Folders are&amp;nbsp;being created at an early stage and documents are getting uploaded at a later point of time into different folders based on criteria.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/thread/66536?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 12:21:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:72e34f58-fd86-49fa-aab8-73d00ab0297f</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Hi. So, the confusion here on two levels. Firstly, yes, tofolder() DOES accept a parameter of &amp;#39;Any Type&amp;#39; and allows for both Numbers (integers and Decimals) and Text. BUT: you need to be aware that whilst a Document&amp;#39;s Id is unique, it&amp;#39;s name is NOT. That is, you can have many folders with the same name in any given environment. So a function to return a handle to a folder can ONLY use the folder&amp;#39;s unique Id (the same principle applies to documents and the todocument() function)&lt;/p&gt;
&lt;p&gt;So, why does the function also accept Text as an input? I&amp;#39;m not sure, but both of the following return a folder object handle:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fn!&lt;span&gt;tofolder&lt;/span&gt;(214372)&lt;/li&gt;
&lt;li&gt;fn!&lt;span&gt;tofolder&lt;/span&gt;(&amp;quot;Folder:214372&amp;quot;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Frankly, I don&amp;#39;t see the point of the latter - if you know the&amp;nbsp;folder&amp;#39;s Id is &lt;span&gt;214372&amp;nbsp;&lt;/span&gt;then the first is sufficient for your purposes.&lt;/p&gt;
&lt;p&gt;So, back to the ORIGINAL problem: how do you create a new folder? You either do this in a Process Model with the Create Folder Smart Service, OR you use the equivalent function, which is a!createFolder(). Both of these are &lt;a href="https://docs.appian.com/suite/help/19.1/Create_Folder_Smart_Service.html"&gt;described here.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/thread/66535?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 11:08:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8d1eaa4e-73a4-430a-886a-74705c67903d</guid><dc:creator>vinayp0002</dc:creator><description>&lt;p&gt;Thanks Dude for the reply. But I see it is returning null if I pass a&amp;nbsp;&lt;span&gt;text input (which is an existing folder name).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/thread/66526?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 07:19:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5193ef6b-eb28-465c-98b0-d69f43ec6414</guid><dc:creator>Dude</dc:creator><description>&lt;p&gt;&lt;strong&gt;&lt;span&gt;tofolder():&amp;nbsp;&lt;/span&gt;Converts a value to Folder&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;tofolder() just &lt;strong&gt;converts&lt;/strong&gt; the given value to folder type. If you provide existing folder id, it checks the existing folders then returns the existing folders otherwise it will converts the given numbers to folder type with no id specified.&lt;/p&gt;
&lt;p&gt;For example,&amp;nbsp;tofolder({001,002})&amp;nbsp;&lt;span&gt;1 - [ID NOT FOUND] (Folder), 2 - [ID NOT FOUND] (Folder).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For text input it just coverts the provided&amp;nbsp;text to folder type. For example&amp;nbsp;tofolder({&amp;quot;Test1&amp;quot;}). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It converts Test1 text to folder as follows&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; 1 - [ID NOT FOUND] (Folder).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/thread/66524?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 06:30:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:63ca3631-34c7-4963-a6ec-e15c9885c1ef</guid><dc:creator>anjup136</dc:creator><description>&lt;p&gt;Hi vinay,&lt;/p&gt;
&lt;p&gt;I am just curious to know, why dont we populate the folder name with static text while creating the folder dynamically and using the same process variable of type folder to store the documents?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Anju&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a scenario to save documents into dynamic folders using tofolder function</title><link>https://community.appian.com/thread/66522?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 05:41:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6d584cf-e729-4c48-befd-89f8f2a6af33</guid><dc:creator>baji mekala</dc:creator><description>&lt;p&gt;Hi vinay,&lt;/p&gt;
&lt;p&gt;I know one syntax and i know its help to you.&lt;/p&gt;
&lt;p&gt;Syntax:&lt;/p&gt;
&lt;p&gt;&amp;quot;internalize(externalize(todocument(1)))&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>