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
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) ) ) } ) } )
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.