Hi All,
I have a requirement where I need to get a document or document ID by UUID (ideal option), or worse case by document name. I know this is not possible out of the box. I have read that there used to be functions in shared components that could accomplish this. With shared components being deprecated, what plugin could I use for this use case?
Thanks,
Walker
Discussion posts and replies are publicly visible
This works consistently only if you introduced a delay after the submit action before accessing the documents. Otherwise you get this error -
a!forEach: Error in a!forEach() expression during iteration 1: Expression evaluation error at function 'document' [line 4]: Document Does Not Exist or has been Deleted) (Data Outputs).
The delay of 1 minute gives Appian enough time to finish the uploading of the files internally to the correct folder before you can access the files' attributes.
NOTE - I have also noticed that documents couldn't be accessed in the same process model that is called in the submit action of the file upload form if activity chaining is enabled in the process model. The behavior was random. I have disabled activity chaining in my PM just to avoid surprises.
walkers0001, Have you been able to retrieve the uuid of a document or folder? If so, could you please post how you were able to do it?
Assuming you have the Content Tools plug-in, you want the getcontentobjectdetailsbyid() function. Since this just returns a string instead of dictionary data (and the string isn't even JSON ...), you will want to set up an Expression Rule to help parse the outputs of the rule if you'll be using it regularly. Disregard this if you would only be using it on a one-off manual basis to pull the UUID for random things.
Hy if I need to access any document from another environment through UUID or by anything, can someone suggest?
Accessing a document from another environment isn't directly possible. You can build an integration around it where you can send document from one env to another in base64 string and then get the properties of it using document function, after the document gets downloaded.