Hi All,
Currently I have an interface where we allow the user to upload documents, we wanted to see if it was possible after the user clicks upload they can see the actual document before the submit the form, that way they "make sure" it is the correct document. Is this possible in appian at all?
thanks in advance
Discussion posts and replies are publicly visible
Yes you can do that in Appian with a!submitUploadedFiles(). If you pass the documentId to documentViewerField directly, it will not render the document.
a!localVariables( local!document, local!showPreview: false, { a!fileUploadField( target: FOLDER value: local!document, saveInto: local!document ), a!richTextDisplayField( showWhen: a!isNotNullOrEmpty(local!document), value: a!richTextItem( text: "Preview Document", link: a!dynamicLink( saveInto: a!submitUploadedFiles( onSuccess: a!save( local!showPreview, true ) ) ) ) ), a!documentViewerField( height: "TALL", showWhen: local!showPreview = true, document: local!document ) } )
Soma said:Yes you can do that in Appian with a!submitUploadedFiles().
FYI, a!submitUploadedFiles() is specifically disabled in User Input Tasks and Start Forms. The approach you list here would work if the document upload is done on a Record or Site (though these areas are not usually recommended for this), but not in a regular process form of any type.