How to get the document ID from Appian documents.
Discussion posts and replies are publicly visible
Appian references documents by their ID already. So you can pass a valid integer to functions that expect a document, and vice versa.
And you can use tointeger() or the document() function to turn a document into a number, or get the ID from a document.
docs.appian.com/.../fnc_scripting_document.html
Thanks Stefan Helzle
Thank you, your suggestion helped me achieve the user requirement of export to Excel and downloading from an interface on a Site. i used a!startProcess to trigger the process model asynchronously and it passes back the document ID where I got it by doing toInteger(pv!documentName) in the process model. Then in the interface, I did todocument(local!documentId)
Great to hear that. BTW, you do not need to cast to an integer and back to a document. Appian is extremely good in automatically converting values into the required type.
Thanks for the tip! I was unsure if the interface fv!process.info.pv... can pass back a process variable of type document. Just updated my interface and process model now