Skip to main content
18-Opal
February 16, 2026
Question

Wildcards in Navigate

  • February 16, 2026
  • 1 reply
  • 73 views

Version: Windchill 13.0

 

Use Case: Doing wildcard search from a Navigate app by calling WRS endpoints like v7/ProdMgmt/Parts with $filter containing asterisks *.


Description:

Hello All,

 

I have a Navigate app, which queries for WTParts, currently $filter-ing by contains(Name, '<query>').

 

We'd like to extend it so that it supports arbitrary wildcards like "quick*fox*dog". WRS docs suggest we can enable wildcards via PTC-WildcardSearch header, but I don't see how it can be done via Navigate, which doesn't seem to allow me specifying custom headers.

 

As for now, I thought of working around this issue by and-chaining "contains" clauses and then filtering out false positives on the ThingWorx side. I'll appreciate better ideas.

 

Thanks,

Constantine

 

1 reply

14-Alexandrite
February 17, 2026

I do the same thing with a mixure of startswith, contains, and endswith.  In a nutshell, I split the string by asterisks then evaluate that array, building a "filter" array with the "startswith", "contains", and "endswith", as appropriate.

  • Create empty filter array.
  • Split the string around asterisks.
  • If first element is not empty, push a "startswith" to the filter array.  For example, *test* splits into three elements: ["", "test", ""].
  • If the last element is not empty, push a "endswith" to the filter array.
  • Loop from position 1 to length-2, pushing a "contains" to the filter array for each element.
  • Join the filter array with " and " to create the $filter string.

 

18-Opal
February 17, 2026
Thanks!

That’s of course a pretty bad solution, as you need to filter out false positives after the query.

For example, if you have a large number of parts, a search like this would likely not return any results: *1*2*3*4*5* (assuming your names are just 5-digit incremental numbers), while a simple 12345 would return one result, as expected.

I do post-query filtering via regex, and that’s also not really trivial due to all necessary escaping that needs to be done…

14-Alexandrite
February 23, 2026

Ah, yes, I see what you mean.  Multiple "contains" is not good.  For my use, it will be sufficient to restrict the wildcard usage to prevent that condition.