I have created a Document Name filter for documents uploaded to the current application I'm working on. However, based on how documents are set up in Appian, I am only able to retrieve the document name through Appian's Document ID. I am using a!pickerFieldDocuments() to filter by documents, but the issue is that when I type in the document name it only pulls up results based on what the document name starts with. I would like the document name filter to use partial name searching instead so that instead of having to know what the document name starts with I can just type in any text included in the name to pull up the results. But I am finding this rather difficult to do using Appian's Document ID to retrieve the document's name property. Does anyone know how to resolve this? Thanks.
Discussion posts and replies are publicly visible
Sure. When I upload documents to Appian, I store the meta data to a database table. Then I can do whatever I need.
We are currently storing the document data to a document data type. We have all of the document attributes except document name but I know we can use Appian Document ID to retrieve the document name?
I am not sure I understand. When I upload a document, Appian stores the binary data to disk, and I can retrieve the default set of meta data using the document() function. Typically I need more than that, so I manage my set of meta data in a table that holds the document ID as a reference. The file stays where it is.
What happens when I want to filter the document by document name in a grid? I understand I can use the document() function to retrieve the document name property but I am finding it is difficult to filter by name and by doing so with partial name searching.
What stefan is saying is that you should keep a separate DB table that stores the document metadata including name (and i'd suggest making it store multiple things such as name, extension, and size at the very least), enabling quick and seamless searching by whatever property you want. Without this, the use case you're describing really isn't possible in appian.
Mike Schmitt , thanks for the clarification. Indeed I only work with the data stored in the database. Whenever the user wants to preview or download the file, I use the document ID from the table to reference the actual file on disk.
My system does that too, though sadly they decided against storing certain document metadata, and the lack of stored sizes-in-bytes has ended up being a major headache for us in the long run due to considerations around needing to cycle out some usage. I've had to implement something to handle that retrospectively.