Editable grid with fileupload field

Certified Senior Developer

Hi,

We have editable grid with file upload field. if we upload multiple documents and remove one row in editable grid. On click of submit , it throws below error

Could not upload “User File (1)”. Reason: The destination folder specified is invalid.

Though rows are removed from editable field. Fileupload field still considerthe values i guess.

How to resolve this?

Please help.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Removing a row in an editable grid, even setting the local variable storing the uploaded doc ID to null, does not keep the document from attempting to upload to the Appian filesystem when the form is submitted.

    One trick I've done in places where it's inconvenient or impossible to take file management measures as mentioned earlier by Matthew, is to disable the deletion of a row if it contains a newly-uploaded file; the user is instructed instead to clear the file upload box first if they wish to remove the row.  (If you still allow the user to perform a "Cancel" click, though, you would still want to handle any necessary deletions as mentioned above).

    Also I would recommend that if the form is submitted and the documents uploaded, and the user gets back to that form immediately or later in a way that they see the previous rows with added documents, don't just show pre-populated file upload fields -- because in this case, if a user clears the upload box and adds a new document, nothing will happen to the old document (it'll still be "orphaned" and sitting in its original location in your filesystem).  Instead I suggest conditionally showing a document download link (preferably formatted within a Rich Text field) for rows that contain previously-submitted documents.

Reply
  • 0
    Certified Lead Developer

    Removing a row in an editable grid, even setting the local variable storing the uploaded doc ID to null, does not keep the document from attempting to upload to the Appian filesystem when the form is submitted.

    One trick I've done in places where it's inconvenient or impossible to take file management measures as mentioned earlier by Matthew, is to disable the deletion of a row if it contains a newly-uploaded file; the user is instructed instead to clear the file upload box first if they wish to remove the row.  (If you still allow the user to perform a "Cancel" click, though, you would still want to handle any necessary deletions as mentioned above).

    Also I would recommend that if the form is submitted and the documents uploaded, and the user gets back to that form immediately or later in a way that they see the previous rows with added documents, don't just show pre-populated file upload fields -- because in this case, if a user clears the upload box and adds a new document, nothing will happen to the old document (it'll still be "orphaned" and sitting in its original location in your filesystem).  Instead I suggest conditionally showing a document download link (preferably formatted within a Rich Text field) for rows that contain previously-submitted documents.

Children
No Data