Skip to main content
May 28, 2026
Question

Upload file component, edit name functionality issue

  • May 28, 2026
  • 1 reply
  • 0 views

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"
)

    1 reply

    shubhama926776
    May 28, 2026

    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. 

    local!currentUploadNames: touniformstring(fv!files.name),

    local!currentUploadNames: touniformstring(
      a!forEach(
        items: local!uploadedDocuments,
        expression: tostring(document(fv!item, "name"))
      )
    )