Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to search multiple WTDocument numbers through WC API

$
0
0

OK. I am now using "65832A00.%;1234.%". That also do not work. I think I need to use qs.appendOr();

 

Below code works. But I have query string which contains 10 or more docs. I am thinking of appending Or condition in a loop. It seems that we can not directly use query string in code.

 

qs = new QuerySpec(wtDocCls);

SearchCondition sc = new SearchCondition(WTDocument.class, WTDocument.NUMBER, SearchCondition.LIKE, "1234%");

qs.appendWhere(sc);

               

qs.appendOr();

SearchCondition sc1 = new SearchCondition(WTDocument.class, WTDocument.NUMBER, SearchCondition.LIKE, "65832A00.%");

 

qs.appendWhere(sc1);

qr = PersistenceHelper.manager.find(qs);


Viewing all articles
Browse latest Browse all 8876

Trending Articles