Upload file component, edit name functionality issue

Certified Senior Developer

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

Parents Reply Children
No Data