- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2025 09:56 PM
I have the following code Automation script code fragment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 01:47 PM
I apologize, I meant to clarify this in the first reply. The Repository.ResultSetQuery operation returns arrays of values, not "documents". So each array entry is just a simple value. IMO you probably want to use Repository.Query 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 Repository.GetDocument operation.
Hyland Sales Solution Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2025 11:11 PM
SELECT * FROM Invoices will get the Invoices documents, assuming that really is the Document Type and not just the title.
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.
Hyland Sales Solution Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 11:26 AM
@Josh-F-Hyland - Thank you. I modified the query to pull from Invoices. When I run the query in NXQL, it brings be back the correct result set. However, path does not seem to return anything. Here is the code that I have:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 01:47 PM
I apologize, I meant to clarify this in the first reply. The Repository.ResultSetQuery operation returns arrays of values, not "documents". So each array entry is just a simple value. IMO you probably want to use Repository.Query 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 Repository.GetDocument operation.
Hyland Sales Solution Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 03:15 PM
Thank you ! That works like charm.
