Multiple File Upload

How can we make the File upload component as dynamic ? I have a rule input which has the type has a record type , so i cant select the multiple array option it it. The document id should be stored in the DB and the files should be saved in a Target folder.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to SM

    I assume you are talking about some interface code.

    The following code snippet works for me. You will have to adapt it to your scenario.

    {
      a!fileUploadField(
        label: "File Upload",
        labelPosition: "ABOVE",
        value: index(ri!documents, 'recordType!{08eba301-a3a4-48a7-b036-9f1f6ad15733}TST Document.fields.{e4de7e9c-c508-46bf-8469-7ef29ce17201}document', null),
        saveInto: a!save(
          target: ri!documents,
          value: a!forEach(
            items: save!value,
            expression: 'recordType!{08eba301-a3a4-48a7-b036-9f1f6ad15733}TST Document'(
              'recordType!{08eba301-a3a4-48a7-b036-9f1f6ad15733}TST Document.fields.{e4de7e9c-c508-46bf-8469-7ef29ce17201}document': fv!item
            )
          )
        ),
        validations: {}
      )
    }