Read excel and validate and cancel upload

Hi community,

I have a a!fileUploadComponent(). A user can upload an excel file. Now if any of the rows of column 'A' or column 'B' is empty then the excel should not be uploaded. A validation message must be shown to the user. Please help me.

Thanks in advance,

Sangeetha

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    This will not be possible without building it in such a way that the user submits the form between the file being uploaded and the validation being performed.  The reason is that you can't do any operations on the uploaded file until it's been moved out of the temporary system-side folder where Appian stores all new uploads, in which we do not have permission to access documents or perform.

    The simple solution will be to make the user upload and then click a button/link to "commit" the upload where such actually causes the form to submit, run through validation node(s), and loop back to the task again.  The user won't notice they've left the task, but you'll be able to perform operations you need.  If the file is invalid, you will need to manually delete it within the process subsequently.

Reply
  • 0
    Certified Lead Developer

    This will not be possible without building it in such a way that the user submits the form between the file being uploaded and the validation being performed.  The reason is that you can't do any operations on the uploaded file until it's been moved out of the temporary system-side folder where Appian stores all new uploads, in which we do not have permission to access documents or perform.

    The simple solution will be to make the user upload and then click a button/link to "commit" the upload where such actually causes the form to submit, run through validation node(s), and loop back to the task again.  The user won't notice they've left the task, but you'll be able to perform operations you need.  If the file is invalid, you will need to manually delete it within the process subsequently.

Children
No Data