File lost after rerendering Upload widget

Hi All,

We have noticed strange behavior while working with the Upload widget in Reactive Apps - uploaded files are not maintained if the Upload widget is rerendered.

We have a multi-step form, where the display of steps is controlled by an If widget, depending on the current step, and the user is allowed to go forwards and backwards between steps. 

In one of the steps (let's say Step 3) we have a couple of mandatory Upload widgets. Once the files are uploaded, the OOB validation passes and the user can go to Step 4 (which is the Review step). Now, if the user goes back to Step 3 and then tries to move forward to Step 4 again, the validation for all the files fails (despite the debugger showing that the respective bound variables have non-empty file names and content).
HTML and JS inspection of each of the inputs shows an empty Filelist and I am assuming that this is causing the issue.

Can anyone please advise on this?

Best,

TZ

Hi Tarik,

Can you share a .oml?

Also if in step3 validation was correct, then going to step 4 and back to step 3, would you need to perform validations again? I suppose only if another file is uploaded.

Regards,

Daniel

Hi Daniel,


Sorry for the delay in getting back to you. Attached is the sample OML, with very minimal UI.

Regarding your question about revalidations, in my original form there are dependencies between steps so I prefer to revalidate upon every click of the "Next" button.

Best,

TZ

Hi Tarik,

Sorry it took some time, here is an updated version of your module.

The wizard has 4 steps, in each step you can upload a file, the previous button works as well as the validation.

At the end i show all the uploaded files. No files are lost when navigating backwards in the wizard.

Ps. If you want just want to upload multiple files, maybe you should also have a look at the following components:

https://www.outsystems.com/forge/component-overview/7405/reactfilepondupload

Regards,

Daniel