MENU
Start a topic
Search
LogIn
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:
All community
This category
This board
Knowledge
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:
Close X
Community Tip
- Help us improve the PTC Community by taking this short
Community Survey
!
X
Community
PLM
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
Windchill - QuerySpec
dgraham-4
1-Visitor
Sep 29, 2011
03:20 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Notify Moderator
Sep 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:
Labels:
Other
Tags:
ptcuser_portal
windchill_solutions
All forum topics
Previous Topic
Next Topic
2 REPLIES
2
ddemay
7-Bedrock
(To:dgraham-4)
Sep 29, 2011
08:30 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Notify Moderator
Sep 29, 2011
08:30 PM
TimestampRangeSearch.. A special type of search condition. If you cannot
figure it out form there, let me know.
praseeth.moothe
1-Visitor
(To:dgraham-4)
Sep 29, 2011
11:11 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Notify Moderator
Sep 29, 2011
11:11 PM
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,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 Adm...
Post Reply
Announcements
Contact Community Management
Top Tags