cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Reset filename in FileUpload control

IoTnewbie
5-Regular Member

Reset filename in FileUpload control

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.

ACCEPTED SOLUTION

Accepted Solutions
ankigupta
5-Regular Member
(To:IoTnewbie)

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.

View solution in original post

5 REPLIES 5
ankigupta
5-Regular Member
(To:IoTnewbie)

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.

IoTnewbie
5-Regular Member
(To:ankigupta)

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.

posipova
20-Turquoise
(To:IoTnewbie)

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.

posipova
20-Turquoise
(To:posipova)

I've submitted a Jira, PSPT-3672

I also linked a KCS article https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS262504&lang=en_US

IoTnewbie
5-Regular Member
(To:posipova)

Thanks Polina. I will explore customizing the FileUpload widget.

Announcements


Top Tags