: File Upload Validation Not Working for PDF Restriction

Certified Associate Developer

I am facing an issue with the a!fileUploadField() component in Appian. The validation logic is supposed to restrict uploads to only PDF files, but it is not throwing an error when an XLSX file is uploaded. Below is my implementation:

a!fileUploadField(
    label: "File Upload",
    labelPosition: "ABOVE",
    target: cons!W500_KnowledgeCenter,
    maxSelections: 5,
    value: ri!File,
    saveInto: ri!File,
    validations: {
        if(fv!files.extension="PDF", "Error", "")
    }
)

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data