how do i upload multiple files and eventually download it after submitting in the summary interface

HI,

I have the code below but only one file upload is allowed. How do I make it multiple upload?

a!fileUploadField(
  label: "Attachments",
  labelPosition: "ABOVE",
  target: cons!Electronic_File_Checklist_Document_Folder,
  maxSelections: 5,
  value: ri!Electronic_File_Processing.attachment1,
  saveInto: ri!Electronic_File_Processing.attachment1,
  validations: {}
)

Thanks in advance

Neil

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    If your save target, ri!Electronic_File_Processing.attachment1, is not set up to handle an array of document IDs (which i'm guessing it isn't), uploading multiple files will not work.

    Generally I'd suggest an approach where you instead have the upload field save into a separate variable i.e. ri!fileUploadList, where the type is document and it's set as an array.  Then afterwards in your process model you can handle mapping these ids to different members of a CDT array, particularly if you're faced with the task of creating a new/blank row in that CDT for each document that was uploaded.

Reply
  • +1
    Certified Lead Developer

    If your save target, ri!Electronic_File_Processing.attachment1, is not set up to handle an array of document IDs (which i'm guessing it isn't), uploading multiple files will not work.

    Generally I'd suggest an approach where you instead have the upload field save into a separate variable i.e. ri!fileUploadList, where the type is document and it's set as an array.  Then afterwards in your process model you can handle mapping these ids to different members of a CDT array, particularly if you're faced with the task of creating a new/blank row in that CDT for each document that was uploaded.

Children
No Data