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
Try to set submit=false
https://docs.appian.com/suite/help/23.2/fnc_system_a_submituploadedfiles.html#usage-considerations
"Using submit: true and saveInto: a!submitUploadedFiles in the same button will not work correctly."
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 ) } ) } ),
I got this "APNX-1-4561-007" error in local!submitUploadedFilesErrorMsg local variable. I don't know what this is.
i got the answer from this https://community.appian.com/discussions/f/portals/26982/a-submituploadedfiles-is-not-working-in-appian-portal-getting-apnx-1-4561-007-error-always-can-someone-help/106216#106216
the constant I was using to set the target of uploaded files was of "Folder or Documents" I reset it to just "Folder" and it worked.
Good catch - I believe this has been a longstanding quirk of the File Upload Field, i.e. it gets choked up if fed an ambiguous "target". I'd point out that you might be able to just wrap the constant in toFolder() instead of changing its type outright, though I'm not sure why you'd bother setting any constant to the "folder or document" type when it's pointing to one of those.