MENU
Connect
PTC University
ThingWorx Developer Portal
PTC Marketplace
Get Help
Product Help
Documentation
eSupport
Register
Log in
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Community
:
Windchill
:
Windchill Discussions
:
Windchill - QuerySpec
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
All community
This category
This board
Tips
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Windchill - QuerySpec
dgraham-4
Newbie
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Email to a Friend
Notify Moderator
09-29-2011
03:20 PM
09-29-2011
03:20 PM
Windchill - QuerySpec
Windchill 8.0 M020
Anyone have the code to limit the scope of a QuerySpec to between two
given dates (Timestamps)?
I'm trying to query WfActivity class
I've got this much:
QuerySpec qs = new QuerySpec(WfActivity.class);
qs.appendWhere(new SearchCondition(WfActivity.class,
WfActivity.NAME, SearchCondition.EQUAL, assignmentName), null);
qs.appendAnd();
qs.appendWhere(new SearchCondition(WfActivity.class,
WfActivity.STATE,SearchCondition.EQUAL,"CLOSED_COMPLETED_EXECUTED"),
null);
qs.appendOr();
qs.appendWhere(new SearchCondition(WfActivity.class,
WfActivity.STATE,SearchCondition.EQUAL,"OPEN_RUNNING"), null);
QueryResult qr = PersistenceHelper.manager.find((StatementSpec)
qs);
but I need to limit the scope to a date range as well.
Thanks
David Graham
CAx/PDM Administrator
Emhart Glass Manufacturing Inc.
Emhart Glass Research Center
123 Great Pond Drive | PO Box 220 | Windsor, CT 06095-0220 | USA
Telephone +1 (860) 298 7377 | Telefax +1 (860) 298 7397
Mobile +1 (203) 376-3144 |
Labels:
Other
Tags
(2)
Tags:
ptcuser_portal
windchill_solutions
All forum topics
Previous Topic
Next Topic
2 REPLIES
2
ddemay
Newbie
(in response to dgraham-4)
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Email to a Friend
Notify Moderator
09-29-2011
08:30 PM
09-29-2011
08:30 PM
Windchill - QuerySpec
TimestampRangeSearch.. A special type of search condition. If you cannot
figure it out form there, let me know.
praseeth.moothe
Newbie
(in response to dgraham-4)
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Email to a Friend
Notify Moderator
09-29-2011
11:11 PM
09-29-2011
11:11 PM
Windchill - QuerySpec
I guess, you could add conditions on the createStamp or updateStamp on the
table.
Praseeth M
> qs.appendOr();
> qs.appendWhere(new SearchCondition(WfActivity.class,
> WfActivity.STATE,SearchCondi...
Announcements