Retrieving a specific document in PM based on its name

Certified Senior Developer

Hi all,

I'm a bit unfamiliar on how can I search for a document based on its name to send it on an email? right now of course doing it manually works but I was wondering if there is a function that returns the document based on its name or anything similar.

For example, I want to send the document named YI5688 (saved in my appian folder called documents) , my process variable contains the name , but I'm not sure how to "search" for the document. Any thoughts or suggestions?

Thanks in advance!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You can use the Content Tools plug-in and its built-in functions like "find content by attribute" which allows you to supply criteria to search such as the name, root folder, type (in this case "document").  Note that Appian has no requirement that files in any folder have unique names, so you will always need to take further steps to ensure you're pulling back only one result.  Generally if you're trying to reference a static file within a process, though, it is recommended to create a constant that points to that file, then reference the constant in your process.  I don't know enough about your use case in this situation to really say much either way about it.

Reply
  • 0
    Certified Lead Developer

    You can use the Content Tools plug-in and its built-in functions like "find content by attribute" which allows you to supply criteria to search such as the name, root folder, type (in this case "document").  Note that Appian has no requirement that files in any folder have unique names, so you will always need to take further steps to ensure you're pulling back only one result.  Generally if you're trying to reference a static file within a process, though, it is recommended to create a constant that points to that file, then reference the constant in your process.  I don't know enough about your use case in this situation to really say much either way about it.

Children