Skip to main content
January 27, 2025
Solved

Attachments not moving to folder

  • January 27, 2025
  • 3 replies
  • 0 views

I have an interface tied to a process model via a!startprocess on the "Upload File to Request" button. In designer mode, this process works normally and moves it to the folder as expected. It does not work when I am on the site.

The file uploaded is saved to the ri!attachments. Everything but the attachments seem to be written to the process variables. Even with requests without folders, it creates a folder and does not move it there. Any guidance would be much appreciated. Thank you so much.

a!columnLayout(
            contents: {
              a!fileUploadField(
                label: "File Upload",
                labelPosition: "ABOVE",
                target: cons!FRR_FOLDER_RECORD_ATTACHMENTS,
                maxSelections: 1,
                value: ri!attachments,
                saveInto: ri!attachments,
                disabled: if(local!readonly = true, true, false),
                buttonDisplay: "ICON",
                buttonSize: "STANDARD"
              ),
              a!buttonArrayLayout(
                buttons: {
                  a!buttonWidget(
                    label: "Upload File to Request",
                    value: ri!attachments,
                    saveInto: a!startProcess(
                      processModel: cons!FRR_PM_ADD_ATTACHMENTS,
                      processParameters: {
                        attachments: ri!attachments,
                        requestId: ri!requestId
                      },
                      isSynchronous: false()
                    ),
                    submit: true,
                    style: "OUTLINE",
                    disabled: or(
                      if(local!readonly = true, true, false),
                      a!isNullOrEmpty(ri!attachments)
                    )
                  )
                },
                align: "START",
                marginAbove: "LESS"
              )
            }
          )

    Best answer by konduruc733182

    Hello [mention:cb000c01eb194af199ffedba27c1da75:e9ed411860ed4f2ba0265705b8793d05] 

    As Stefan mentioned you cannot submit files from a!startProcess().

    Where do you have this file upload field? Is it somewhere in the site?

    Optional workaround: Can use related action - If so, you can use a related action instead of the a!startProcess() and upload the files in the start form in the process of the related action. (You can reuse the same process that you have currently posted, just that you will have to add the start form and pass the identifiers and required variables, using your request record.) 

    3 replies

    stefanhelzle0001
    January 28, 2025

    a!startProcess does not submit files. Never has. Uploaded documents are only submitted on a submit action.

    konduruc733182
    January 28, 2025

    Hello [mention:cb000c01eb194af199ffedba27c1da75:e9ed411860ed4f2ba0265705b8793d05] 

    As Stefan mentioned you cannot submit files from a!startProcess().

    Where do you have this file upload field? Is it somewhere in the site?

    Optional workaround: Can use related action - If so, you can use a related action instead of the a!startProcess() and upload the files in the start form in the process of the related action. (You can reuse the same process that you have currently posted, just that you will have to add the start form and pass the identifiers and required variables, using your request record.) 

    January 28, 2025

    My file upload field is nested in another interface.

    My request is service backed rather than record backed.