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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

auto suggestion example with IBA values

Vishwa_RADDI
6-Contributor

auto suggestion example with IBA values

Hi ,

I'm trying to achieve below auto suggestion example with my IBA values , could you please extend your support here ?

VR_10450322_0-1687435997958.png

 

Thanks,

Vishvanatha

 

Originally posted as a new reply on this topic.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @avillanueva 

Autosugestion is more complicated. It is not just set the enumerated constrain. 

@Vishwa_RADDI 

You can check a help where is an example how to do so.

Configuring Auto-Suggest Results

 

Create class that extends com.ptc.core.components.suggest.Suggestable

	public Collection<SuggestResult> getSuggestions(SuggestParms suggestParams)
	{
		ArrayList suggestList = new ArrayList();
		String searchKey = suggestParams.getSearchTerm().toUpperCase();

		suggestList.addAll(getResultsByKey(searchKey)); // getResultsByKey is a CODE WHERE THE SEARCH IS DONE returns a List

		return suggestList;
	}

Add a services to service.properties

wt.services/svc/default/com.ptc.core.components.suggest.Suggestable/serviceMYOWNSuggestionHelper/null/0=com.ext..MYOWNSuggestionHelper/duplicate

 

use the service in a DataUtility (how to create DU Create a Data Utility)

SuggestTextBox suggest = new SuggestTextBox(component_id, "serviceMYOWNSuggestionHelper");

 

Hope this can help you. 

 

Example>

 

PetrH

View solution in original post

2 REPLIES 2

I believe this is done with constraints:

https://support.ptc.com/help/wnc/r12.0.2.0/en/#page/Windchill_Help_Center%2FTypeMgrAttrConstraintRuleRef.html

In the Type and Attribute Manager

Hi @avillanueva 

Autosugestion is more complicated. It is not just set the enumerated constrain. 

@Vishwa_RADDI 

You can check a help where is an example how to do so.

Configuring Auto-Suggest Results

 

Create class that extends com.ptc.core.components.suggest.Suggestable

	public Collection<SuggestResult> getSuggestions(SuggestParms suggestParams)
	{
		ArrayList suggestList = new ArrayList();
		String searchKey = suggestParams.getSearchTerm().toUpperCase();

		suggestList.addAll(getResultsByKey(searchKey)); // getResultsByKey is a CODE WHERE THE SEARCH IS DONE returns a List

		return suggestList;
	}

Add a services to service.properties

wt.services/svc/default/com.ptc.core.components.suggest.Suggestable/serviceMYOWNSuggestionHelper/null/0=com.ext..MYOWNSuggestionHelper/duplicate

 

use the service in a DataUtility (how to create DU Create a Data Utility)

SuggestTextBox suggest = new SuggestTextBox(component_id, "serviceMYOWNSuggestionHelper");

 

Hope this can help you. 

 

Example>

 

PetrH

Top Tags