I Have a Form in wich I upload documents. It works well.When using Update action, I need to see what documents have been uploaded, keeping the possibility to add more documents.How to?
Discussion posts and replies are publicly visible
Hi,
Query the Appian Document ID and pass it to the file upload field.
https://docs.appian.com/suite/help/22.2/File_Upload_Component.html
For adding more documents, you can use file Upload components and to show what document has been uploaded you can store the document id into the database and while showing fetch the id from DB and show the document name for the document id into the front end. you can use the download document link as well if you want to download it as well.
The default method (as you can already see here) is to show a File Upload Field and pass in the previously-uploaded document's ID (and preferably make the field read-only).
I recommend against this method because the results are clunky and, IMHO, kinda amateurish. The file upload field populates with the document's name but not much other useful information (other than perhaps the file size). The user isn't able to preview or even download the existing document though, so they're stuck just seeing the filename and not much more.
Instead I'd recommend setting up a Rich Text display field to show the document and, depending on what you want to accomplish, allow various other options. The most common thing to do here is to show the document's name and turn it into a link tied to a Document Download Link, which upon clicking, allows the user to download the document. Alternatively, depending on the file type, the user could be allowed to open the document in an a!imageField() (for picture type documents) or an a!documentViewerField() (for PDF files and Text files). I usually make a separate link, tied to an icon (like a magnifying glass), that saves the affected Document ID into a local variable when clicked, and have the Preview field configured to open when the Document ID is non-null.
With some trial and error, you can pretty easily set up something fairly functional and nice-looking, like this example: