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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Search functionality on Advanced grid for selected columns

KN_9774047
5-Regular Member

Search functionality on Advanced grid for selected columns

https://community.ptc.com/t5/ThingWorx-Developers/how-do-I-search-specific-entity-in-grid-Advanced/td-p/687561

 

Read above post and implemented the same.Need to implement search feature only for 3 columns out of 10 columns of my grid.But search is working for all the columns.Please help me!

1 ACCEPTED SOLUTION

Accepted Solutions
suverma
12-Amethyst
(To:KN_9774047)

Hi @KN_9774047 

 

You can refer to the attached entities to implement search feature in an Advanced Grid and use Query Parameter in your search.

 

Hope it will help!!

View solution in original post

5 REPLIES 5
suverma
12-Amethyst
(To:KN_9774047)

Hi @KN_9774047 

 

Can you not modify your Query Filter to include those column names to which you want the apply the search to.

 

Here is a link with examples on Query Filter for search: Searching and Filtering in Advanced Grid 

 

Do revert for more queries.

KN_9774047
5-Regular Member
(To:suverma)

I am directly binding inbuilt property queryfilter to the service input now.

 

In that example it shows like below :

 

{"maxItems":100000,"query":{"filters":{"type":"OR","filters":[{"fieldName":"id","type":"LIKE","value":"%Rain%"},{"fieldName":"date","type":"LIKE","value":"%Rain%"},{"fieldName":"max_temp","type":"LIKE","value":"%Rain%"},{"fieldName":"min_temp","type":"LIKE","value":"%Rain%"},{"fieldName":"cold","type":"LIKE","value":"%Rain%"},{"fieldName":"visibility","type":"LIKE","value":"%Rain%"},{"fieldName":"wind","type":"LIKE","value":"%Rain%"},{"fieldName":"precipitation","type":"LIKE","value":"%Rain%"},{"fieldName":"events","type":"LIKE","value":"%Rain%"},{"fieldName":"image","type":"LIKE","value":"%Rain%"},{"fieldName":"key","type":"LIKE","value":"%Rain%"},{"fieldName":"location","type":"LIKE","value":"%Rain%"},{"fieldName":"source","type":"LIKE","value":"%Rain%"},{"fieldName":"sourceType","type":"LIKE","value":"%Rain%"},{"fieldName":"tags","type":"LIKE","value":"%Rain%"},{"fieldName":"timestamp","type":"LIKE","value":"%Rain%"}]}}}

 

But I donot want to specify any value.Value can be anything in the search field.How do I achieve it?

suverma
12-Amethyst
(To:KN_9774047)

Hi @KN_9774047 

 

You can refer to the attached entities to implement search feature in an Advanced Grid and use Query Parameter in your search.

 

Hope it will help!!

KN_9774047
5-Regular Member
(To:suverma)

Thank you!!

slangley
23-Emerald II
(To:KN_9774047)

Hi @KN_9774047.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags