Skip to main content
16-Pearl
December 24, 2021
Question

How to clear content in Autocomplete widget

  • December 24, 2021
  • 2 replies
  • 2502 views

Hi,

 

I am using Thingworx 8.5.1 version.  I am trying to clear selected search content. Can any one help me how to clear search content from Autocomplete widget?.

 

Thanks&Regards,

Latha

2 replies

24-Ruby III
December 24, 2021

 Hi Latha,

 

A similar question was already earlier - "Clear all content in autocomplete widget": https://community.ptc.com/t5/ThingWorx-Developers/Clear-all-content-in-autocomplete-widget/td-p/607094 

vi116-PearlAuthor
16-Pearl
December 24, 2021

Hi,

 

Looks like there is no response for similar question.

 

Regards,

Latha

24-Ruby III
December 24, 2021

@tmisner 

5-Regular Member
December 27, 2021

Hi Latha,

 

I have checked the possibility of clearing the entered text on button click using auto complete widget .The issue is auto complete widget is designed for holding a set of values and matching the entered content with set of values to show the suggestions .

There is no direct property/event in the widget which can directly clear the entered text. Even there is no possibility of resetting the entered text on button click .There is changedText property which takes the entered text but it’s an outgoing property (->) and so there is no way of setting the text to null on a click .

The only way it will be feasible is to have an incoming property called “ResetToDefaultValue” as we have it in text box .So you can take a reference of text box widget code and try to customize your auto complete widget for adding “ResetToDefaultValue” property .

 

You can customize it as per your need. Kindly check the below attached article:

https://www.ptc.com/en/support/article/CS201191

 

Regards

Bhawna

vi116-PearlAuthor
16-Pearl
December 27, 2021

Thank you.

 

I will try to develop custom widget.

 

Regards,

Latha