Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hey, gurus!
I feel like I have been able to look this up before....
Can a QuerySpec be case insensitive? E.g.
qs = new QuerySpec(WTGroup.class);
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue), new int[]{0});
Would like to find
myString
by using "string" or "String" or "STRING" for searchValue above.
I am so sure I've read this somewhere........
Looked through the manuals, will go through again.....
Solved! Go to Solution.
@BrianKrieger wrote:
Hey, gurus!
I feel like I have been able to look this up before....
Can a QuerySpec be case insensitive? E.g.
qs = new QuerySpec(WTGroup.class);
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue), new int[]{0});
Would like to find
myString
by using "string" or "String" or "STRING" for searchValue above.
I am so sure I've read this somewhere........
Looked through the manuals, will go through again.....
Take a look at this:
https://www.ptc.com/en/support/article?n=CS189245
Change your:
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue), new int[]{0});
to this:
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue, false), new int[]{0});
@BrianKrieger wrote:
Hey, gurus!
I feel like I have been able to look this up before....
Can a QuerySpec be case insensitive? E.g.
qs = new QuerySpec(WTGroup.class);
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue), new int[]{0});
Would like to find
myString
by using "string" or "String" or "STRING" for searchValue above.
I am so sure I've read this somewhere........
Looked through the manuals, will go through again.....
Take a look at this:
https://www.ptc.com/en/support/article?n=CS189245
Change your:
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue), new int[]{0});
to this:
qs.appendWhere(new SearchCondition(WTGroup.class, WTGroup.NAME, SearchCondition.LIKE, "%"+searchValue, false), new int[]{0});
Sweet. That is it! And is what I had imagined, a simple switch. I am positive I had read it somewhere.....I need to go find it because I do remember where I read it had some other direct query options.
Thanks as always, man!