Skip to main content
sivasuryap0002
November 6, 2021
Question

a!fileUploadField

  • November 6, 2021
  • 3 replies
  • 0 views

Even though there is no code changes , I am getting an error when shifting to designer mode from Expression mode.

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!fileUploadField [line 78]:


In Designer mode:


Why this is happening? and how to stop it?

a!fileUploadField(
                        label: "Upload An Image :",
                        labelPosition: "ABOVE",
                        target: cons!CS_DOCUMENT_FOLDER,
                        fileNames: fv!files.name: local!registratioNo,
                        fileDescriptions: "This is the uploaded file for the vehicle : " & local!registratioNo,
                        maxSelections: 1,
                        value: local!file,
                        saveInto: {
                          local!file,
                          a!save(ri!Vehicle.UploadedFile, save!value)
                        },
                        required: if((local!required), true(), false()),
                        validations: if(
                          fv!files.extension <> "JPG",
                          "File format is not supported ",
                          if(
                            fv!files.size > 1000000,
                            "File size should not be greater than 1 MB",
                            {}
                          )
                        )
                      )


Thanks In Advance,

Surya.

    3 replies

    stefanhelzle0001
    Brainy
    November 6, 2021

    Line 5 seems to be wrong. Please check that.

    sivasuryap0002
    November 7, 2021

    Hello [mention:126a676c85024855948336691b0a7b92:e9ed411860ed4f2ba0265705b8793d05],


    I have tried fv!file.name as well but it didn't worked (as the max selection is 1 I have not used any looping).
    Could you suggest me the correct way please.

    Thanks in advance,
    Surya.

    stefanhelzle0001
    Brainy
    November 7, 2021

    fileNames: fv!files.name: local!registratioNo,
    

    There is two things.

    First, the last part "local!registratioNo," is wrong syntax. Remove it and this should work.

    Second, if you do not want to modify the filenames, you can just ignore that parameter.