<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Nuxeo LTS2023 Automation Script and Retrieving Folder Properties in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487767#M15764</link>
    <description>&lt;P&gt;Thank you !&amp;nbsp; That works like charm.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2025 20:15:09 GMT</pubDate>
    <dc:creator>Sudarshan_Ghate</dc:creator>
    <dc:date>2025-03-05T20:15:09Z</dc:date>
    <item>
      <title>Nuxeo LTS2023 Automation Script and Retrieving Folder Properties</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487726#M15760</link>
      <description>&lt;P&gt;I have the following code Automation script code fragment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;var query = "SELECT * FROM Folder WHERE ecm:primaryType = 'Invoices';&lt;/DIV&gt;&lt;DIV&gt;var resultSet = Repository.ResultSetQuery(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; input, {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; query: query}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; );&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Console.log("Processing Result Set");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; if (resultSet.length === 0) {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Console.error("No matching Invoice Folder.");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; else {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var targetFolder = resultSet[0];&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How do I enumerate the folder properties?&amp;nbsp; I am trying to find the Folder Path so that I can execute the Document.Move and move the incoming document into the folder.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SG&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Mar 2025 02:56:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487726#M15760</guid>
      <dc:creator>Sudarshan_Ghate</dc:creator>
      <dc:date>2025-03-05T02:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo LTS2023 Automation Script and Retrieving Folder Properties</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487732#M15761</link>
      <description>&lt;P&gt;SELECT * FROM Invoices will get the Invoices documents, assuming that really is the Document Type and not just the title.&lt;/P&gt;&lt;P&gt;targetFolder.path will give you the path. Not sure what you mean by "enumerate the folder properties". Documents in Nuxeo aren't simple enums, they can be made of of many schemas. But you don't need that to get the path.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 04:11:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487732#M15761</guid>
      <dc:creator>Josh-F-Hyland</dc:creator>
      <dc:date>2025-03-05T04:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo LTS2023 Automation Script and Retrieving Folder Properties</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487756#M15762</link>
      <description>&lt;P&gt;&lt;a href="https://connect.hyland.com/t5/user/viewprofilepage/user-id/143968"&gt;@Josh-F-Hyland&lt;/a&gt;&amp;nbsp;- Thank you.&amp;nbsp; I modified the query to pull from Invoices.&amp;nbsp; When I run the query in NXQL, it brings be back the correct result set.&amp;nbsp; &amp;nbsp;However, path does not seem to return anything.&amp;nbsp; Here is the code that I have:&lt;/P&gt;&lt;DIV&gt;Console.log("Processing Result Set");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; if (resultSet.length === 0) {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Console.error("No matching Invoice found.");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return document;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; else {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Console.log("Matching Folder Found " + resultSet[0]);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var targetFolder = resultSet[0];&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var newpath = targetFolder.path;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Console.log("Document will be moved to " + newpath);&lt;/DIV&gt;&lt;DIV&gt;And it produces the following output.&amp;nbsp; &amp;nbsp; &amp;nbsp;I am not sure why newpath is undefined !&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;2025-03-05T11:11:44,621 WARN&amp;nbsp; [http-nio-0.0.0.0-8080-exec-7] [org.nuxeo.automation.scripting.helper.Console] [LOG] Processing Result Set&lt;/DIV&gt;&lt;DIV&gt;2025-03-05T11:11:44,658 WARN&amp;nbsp; [http-nio-0.0.0.0-8080-exec-7] [org.nuxeo.automation.scripting.helper.Console] [LOG] Matching Folder Found {ecm:uuid=c814bd3b-2a21-4fd9-9d28-4a14b5556f2e}&lt;/DIV&gt;&lt;DIV&gt;2025-03-05T11:11:44,661 WARN&amp;nbsp; [http-nio-0.0.0.0-8080-exec-7] [org.nuxeo.automation.scripting.helper.Console] [LOG] Document will be moved to undefined&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I appreciate your assistance.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Mar 2025 16:26:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487756#M15762</guid>
      <dc:creator>Sudarshan_Ghate</dc:creator>
      <dc:date>2025-03-05T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo LTS2023 Automation Script and Retrieving Folder Properties</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487765#M15763</link>
      <description>&lt;P&gt;I apologize, I meant to clarify this in the first reply. The&amp;nbsp;&lt;STRONG&gt;Repository.ResultSetQuery&lt;/STRONG&gt; operation returns arrays of values, not "documents". So each array entry is just a simple value. IMO you probably want to use &lt;STRONG&gt;Repository.Query&lt;/STRONG&gt; operation, which will return an array of complete documents (so you can use result[i].path, result[i].title, result[i]["myschema:myfield"], etc.) If you wanted to use Repository.ResultSetQuery you need to list the properties that you want to fetch e.g. "SELECT ecm:path FROM Invoices" *or* fetch each document using the &lt;STRONG&gt;Repository.GetDocument&lt;/STRONG&gt; operation.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 18:47:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487765#M15763</guid>
      <dc:creator>Josh-F-Hyland</dc:creator>
      <dc:date>2025-03-05T18:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo LTS2023 Automation Script and Retrieving Folder Properties</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487767#M15764</link>
      <description>&lt;P&gt;Thank you !&amp;nbsp; That works like charm.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2025 20:15:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-lts2023-automation-script-and-retrieving-folder-properties/m-p/487767#M15764</guid>
      <dc:creator>Sudarshan_Ghate</dc:creator>
      <dc:date>2025-03-05T20:15:09Z</dc:date>
    </item>
  </channel>
</rss>

