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

  • @vasilisg, coorect me if i am wrong..1.Are you working on tempo forms or portal forms
    2. Suppose if you are working on sail form, check the fileuploadfield component..once you upload the document same doc id is saved into to folder or not
  • we are working on tempo forms and we use the fileUploadField(), and the way it works is that the document is only saved when a submit button is pressed. So what is the point of having the default save button if it doesn't work correctly?
  • @vasilisg, please send your code snippets for better understanding...
  • When we are working with SAIL forms, and the form is having fileUploadField then to store the document we are supposed to submit the form by means of a!buttonWidgetSubmit (the one which you get by default when creating form with interface designer)

    Kindly clarify the button you are using is a!buttonWidgetSubmit or not. To get the document stored on server you are supposed to submit the page (not needed to save).

    Let us know some details about the scenario.
  • Yes the button is a!buttonWidgetSubmit,

    Here is the scenario: I have a form with multiple fields and one document to be uploaded, The user fills some of the fields and uploads a document but hasn't completed all fields so he wishes to temporary save the form and continue later. This function is supposed to be taken care of by using the default save button on top. However when the default save button is pressed the document is lost which is clearly a bug of the default save button functionality.

    That is the reason we created our own custom a!buttonWidgetSubmit which works as it should. We have no problem with our own a!buttonWidgetSubmit, we have a problem with the default save button form on top of the page which doesn't work.

    So, either the default save button should be fixed by supporting temporary documents or it should be removed so that is replaced by our own.
  • @vasilisg, i tried the same in sites related actions, i got an error that save changes functionality is is not working if uploaded documents exists. Refer the screenshot.

  • 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.
  • Seems like it is default behavior for "Save" button when tried to save the form with a document. @ Venu is the Task show "Save" button when opened through sites?
  • First of all thank you all for your responses,

    Its been concluded that the save button is not reliable, so we would like to remove the save button because it is difficult to explain to the client that he should ignore the top save button.

    Any idea on how to remove the save button?
  • Hi Vasilisg, "Save" option is OOTB functionality and we don't have control on this in Tempo. But When the form is opened in through sites, "Save" and "Reassign" button will not be displayed to the User.