Updating the file name in fileuploadfield() using parameter documentActions: "EDIT_NAME", unable to fetch new updated name in either local variable or fv!files.name and validation is failing.
a!fileUploadField( label: "Documents", documentActions: "EDIT_NAME", labelPosition: "ABOVE", value: local!uploadedDocuments, saveInto: { local!uploadedDocuments }, validations: { a!localVariables( local!currentUploadNames: touniformstring(fv!files.name), local!existingDocNames:local!existingDocs, local!hasDuplicates: length(intersection(local!currentUploadNames, local!existingDocNames)) > 0, local!hascurrentDuplicates: length(local!currentUploadNames) <> length(union(local!currentUploadNames, local!currentUploadNames)),
if( or( local!hasDuplicates,local!hascurrentDuplicates), "Duplicate files detected in your selection. Please ensure all uploaded files have unique names.", null ))
}, maxSelections: 10, helpTooltip: "Supported file types: JPEG, PNG, SVG, PDF, Microsoft Excel, Microsoft Word, Microsoft PowerPoint, TXT, CSV, XML, ZIP" )
Discussion posts and replies are publicly visible
Use document() to read the edited name, not fv!files.name; with EDIT_NAME, the new name is saved on the document, while fv!files.name keeps the original.
kavyac0003 said:local!currentUploadNames: touniformstring(fv!files.name),
local!currentUploadNames: touniformstring( a!forEach( items: local!uploadedDocuments, expression: tostring(document(fv!item, "name")) ) )