Hello Everyone,
its working for the first when i upload file and file name when remove file and uploading the new one getting the error.Thanks in advance for your help.
Thanks & Regards,
Srikanth.
Discussion posts and replies are publicly visible
This is a good example to make this work:
https://docs.appian.com/suite/help/26.1/File_Upload_Component.html#file-upload-in-a-start-form-or-task
What appian version are you in?
Prior to 25.3, the document() function can not work on freshly-uploaded (aka 'un-submitted') documents. From your screenshot, I can tell you're not yet in 25.3 as the Preview Toggle changed over to the current version in that release. So what you're attempting to do here is not yet supported for your Appian version.
You could try this. It seems you're working on a lower version of Appian where the document function doesn't work on virtual document id.
a!localVariables( local!indexDoc: ri!doc, { a!fileUploadField( label: "Upload Document", labelPosition: "ABOVE", required: true(), maxSelections: 1, value: local!indexDoc, target: "ADD YOUR CONSTANT HERE", saveInto: { local!indexDoc, a!save(ri!doc, save!value), } ), a!richTextDisplayField( value: { a!richTextItem( text: if( a!isNullOrEmpty(local!indexDoc), "not found", "File Uploaded Successfully" ), link: if( a!isNullOrEmpty(local!indexDoc), null, a!documentDownloadLink(document: local!indexDoc) ) ) } ) } )
Thanks Mike, currently we are using 25.2
Does a!documentDownloadLink() work without erroring on freshly-uploaded files pre-25.3? I haven't double-checked but I would expect this will error out.
The only (supported) workaround I know of that'll work is to use the "content object details by ID" plug-in function, which can pull such properties as (full) document name even for documents still in the fresh-upload purgatory area of Appian's filesystem. I can post my code here if anyone needs but it's a bit of a trudge.