Upload Document with default save button does't work

Hi,

We are working on Appian 16.3 (appian cloud) and we have the following form issue: we have created a form that has a fileUploadField() component, we upload the document and then press the save button and when reopening the form the document has been lost.

In order to fix this issue, we have created a custom save submit button that saves the documentId to a variable so when reopening the form, the document is shown uploaded.

So now the problem has been tranformed into how to remove the default save button?

Any advice is appreciated,
Thank you.

OriginalPostID-241815

  Discussion posts and replies are publicly visible

Parents
  • I'm not entirely surprised that this does not work, actually. The way Appian handles document uploads is through temporary document IDs. When you initially upload the document on the form, the document is put into a temporary folder and given a temporary document id. When a submit widget button is called, it updates all PVs of type document with new document IDs, as well as moves the documents to the appropriate folders.

    Since the save button defaultly in Appian does not actually submit the form, it is not really plausible to have uploaded documents be saved as well, since Appian would then re-do the logic for changing the document ID when you do actually submit the form.

    The way we have handled this in the past is to, as you have done, have a custom save button of type submit, and to have a separate PV for previously uploaded documents and for newly uploaded documents. You would also need to add SAIL and some other logic to handle users deleting previously uploaded files though.

    It's a bit of a frustrating limitation of the default save, but I can see why the limitation is there.
Reply
  • I'm not entirely surprised that this does not work, actually. The way Appian handles document uploads is through temporary document IDs. When you initially upload the document on the form, the document is put into a temporary folder and given a temporary document id. When a submit widget button is called, it updates all PVs of type document with new document IDs, as well as moves the documents to the appropriate folders.

    Since the save button defaultly in Appian does not actually submit the form, it is not really plausible to have uploaded documents be saved as well, since Appian would then re-do the logic for changing the document ID when you do actually submit the form.

    The way we have handled this in the past is to, as you have done, have a custom save button of type submit, and to have a separate PV for previously uploaded documents and for newly uploaded documents. You would also need to add SAIL and some other logic to handle users deleting previously uploaded files though.

    It's a bit of a frustrating limitation of the default save, but I can see why the limitation is there.
Children
No Data