Skip to main content
1-Visitor
May 11, 2017
Solved

Reset filename in FileUpload control

  • May 11, 2017
  • 5 replies
  • 6556 views

Hi,

I have a requirement to reset/clear the filename from FileUpload widget after  the upload is successful.

From what I have observed, the text shows even after the upload is successful. I need to clear the file name as shown below:

From this -->

To this -->

Any help would be appreciated.

Best answer by ankigupta

Hi Hem Upadhyaya​,

There is no Reset Default value option for File Upload widget so it cannot be cleared directly.

As a workaround you can reload the mashup on UploadComplete event of File Upload widget.

You can use the Expression Widget to reload a Mashup fully by putting location.reload() in the expression parameter of the Widget.


I hope it helps.

5 replies

ankigupta5-Regular MemberAnswer
5-Regular Member
May 11, 2017

Hi Hem Upadhyaya​,

There is no Reset Default value option for File Upload widget so it cannot be cleared directly.

As a workaround you can reload the mashup on UploadComplete event of File Upload widget.

You can use the Expression Widget to reload a Mashup fully by putting location.reload() in the expression parameter of the Widget.


I hope it helps.

IoTnewbie1-VisitorAuthor
1-Visitor
May 11, 2017

Thanks Ankit Gupta for the workaround. Reloading mashup will work. However I don't want to reload entire mashup. The reason being that I have multiple widgets on the screen which may hold some values (like label, grid etc.) and they will get reset too.

Is there any other way out? Reloading the mashup is my last option.

20-Turquoise
May 11, 2017

You could also look into custom development and modifying the file upload widget (do make a copy of the original widget for backup purposes). Attached is some documentation on the custom extensibility.

I will also go ahead and place an enhancement request on your behalf; However, please keep in mind the delivery of enhancement requests is not guaranteed as it depends on current workload and availability of the R&D team, prioritizng bugs and existing issues.