appian portal - Unable to save uploaded file in the folder

Certified Associate Developer

Hi,

I have created a portal in appian which is receiving applications along with file uploads.

when I run the form directly from within the interface (Designer) it is saving the uploaded documents.

but when I publish the portal and try to fill the form with same info it is saving rest of the fields in database along with file ID but actual file is not being uploaded in knowledge center sub-forlder via appian portal.

code on my button is:

a!fileUploadField(
                              label: "Cover Letter",
                              labelPosition: "ABOVE",
                              target: cons!ACP_Cons_ApplicantDocsFolder,
                              fileNames: "File-" & now(),
                              maxSelections: 1,
                              value: local!applicantinfo['recordType!ACP Job Applicant.fields.coverLetter'],
                              saveInto: {
                                local!coverLetter,
                                local!applicantinfo['recordType!ACP Job Applicant.fields.coverLetter']
                              },
                              required: true(),
                              validations: if(
                                or(fv!files.extension = lower("pdf")),
                                null,
                                "Please upload a valid PDF file"
                              )
                            ),
                            
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: "Apply",
                      icon: "paper-plane",
                      iconPosition: "END",
                      submit: true(),
                      saveInto: {
                        a!submitUploadedFiles(
                          documents: { local!coverLetter, local!resume }
                        ),
                        a!startProcess(
                          processModel: cons!ACP_New_Applicant_Via_Portal,
                          processParameters: { applicant: local!applicantinfo },
                          onSuccess: {
                            a!save(local!applicantinfo, null),
                            a!save(local!Applycheck, null),
                            a!save(local!jobID, null),
                            a!save(
                              local!successmessage,
                              "Form Submitted successfully"
                            )
                          }
                        )
                      },
                      size: "STANDARD",
                      width: "MINIMIZE",
                      style: "PRIMARY",
                      loadingIndicator: true
                    )
                  },
                  align: "END"
                ),

I gave service.account permission to my folders but still files are not being uploaded in the folder via appian portal i created.

below is the security groups / users I am setting

  Discussion posts and replies are publicly visible

Parents Reply
  • +1
    Certified Lead Developer
    in reply to Stefan Helzle

    I can confirm that (on a Portal page, anyway), the configuration of the "submit" parameter on the button in this case makes no difference.  In my test portal I have an array of differently-configured buttons, including two that are identical other than opposing "submit" values, and I just tested both of them as working.

    a!buttonWidget(
      label: "SubmitUploaded Only (non-submit)",
      loadingIndicator: true(),
      disabled: local!submitSuccess,
      submit: false(),
      saveInto: {
        a!submitUploadedFiles(
          onSuccess: {
            a!save(local!submitSuccess, true())
          },
          onError: {
            a!save(
              local!submitUploadedFilesErrorMsg,
              fv!error
            )
          }
        )
      }
    ),
    a!buttonWidget(
      label: "SubmitUploaded Only (submit)",
      style: "PRIMARY",
      loadingIndicator: true(),
      disabled: local!submitSuccess,
      submit: true(),
      saveInto: {
        a!submitUploadedFiles(
          onSuccess: {
            a!save(local!submitSuccess, true())
          },
          onError: {
            a!save(
              local!submitUploadedFilesErrorMsg,
              fv!error
            )
          }
        )
      }
    ),

Children