Hello All,
I am trying to upload file through Appian Portal, but a!submitUploadedFiles() is not working properly. i am getting APNX-1-4561-007 error always. I have created service account and provided appropriate security to Folder as well. Can someone help ?
a!localVariables( local!fileUpload, local!furesult, a!formLayout( label: "Form - "&local!furesult, contents: { a!sectionLayout( contents: { a!fileUploadField( label: "File Upload", labelPosition: "ABOVE", value: local!fileUpload, saveInto: local!fileUpload, validations: {}, target: cons!SGPL_2023_PLAYER_PICS_FOLDER ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", submit: true, style: "PRIMARY", saveInto: a!submitUploadedFiles( onSuccess: { a!save(local!furesult, "Document Saved") }, onError: { a!save(local!furesult, fv!error) } ) ) }, secondaryButtons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!cancel, submit: true, style: "NORMAL", validate: false ) } ) ))
Discussion posts and replies are publicly visible
In a!fileUploadComponent, target is missing , where the target folder has to be provided , the service account must have Edit permissions to the target folder
Hello Susmetha, target is already configured. When I test it as an interface it's working fine but it's failing through Appian Portals
Hi Nitin, You have used rule input ri!cancel in the secondary buttons layout and we can not use rule inputs in the main interface of a portals. Rule inputs can be configured in the sub interfaces.
Hello Harshita, Portal is already published. I have used rule inside main interface and testing file upload.
Hi Nitin Gaikwad
Were you able to resolve this issue?
Appian Solutions/ Mike Schmitt/ Peter Lewis
Even I am also facing the same problem.
My findings: In interface mode, I added a text readonly field, in that I am able to see the folder and its ID value, whereas the same field is empty when launched from portal. I think it is not able to access the folder constant, but I have given the service account editor access to the Knowledge center, which is the parent of the target folder.Is this any kind of bug with Appian Portals?
INTERFACE SCREENSHOT
PORTAL SCREENSHOT
Does your service account have read permission on the constant pointing to the folder?
Hi Alex Boerescu
Yes, I have given editor access to the TDP Portal Users group (which has the service account) for the Rules & constant folder and Knowledge Center. Please find the below screenshot for the same.
Hello Bharath, no I am not able to resolve this issue yet. I am using Appian Community free edition to test this POC. I am able to get document Id , but file is not getting upload to destination folder.
Hello Alex, I have tried with Editor as well as Admin permissions but no luck.
I am using Appian Community free edition to test this POC.
Can you check what type of constant you are using for the target folder? Make sure it is set to "Folder" and not "Document or Folder". I believe there is an existing bug with using "Document or Folder" constants in portals.