cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

SearchCondition to look for a specific revision of an EPMDocument?

RandyJones
19-Tanzanite

SearchCondition to look for a specific revision of an EPMDocument?

I am needing to query for a specific revision of an EPMDocument. So given an epmdocument number and
a revision I have the following:

String epmNo = "myNumber";
String rev = "A";

QuerySpec qs = new QuerySpec(EPMDocument.class);

//This part works
qs.appendWhere(new SearchCondition(EPMDocument.class, EPMDocument.NUMBER, SearchCondition.LIKE,
epmNo), null);

//This is the part that does not work: "EPMDocument.REVISION cannot be resolved"
qs.appendWhere(new SearchCondition(EPMDocument.class, EPMDocument.REVISION, SearchCondition.EQUAL,
rev), null);



What magic text do I put in for the searchcondition to search for a specific revision?
EPMDocument.REVISION gives an error:EPMDocument.REVISION cannot be resolved

Does anybody give me a pointer to where the possible searchcondition arguments are documented?

Thanks

--
2 REPLIES 2

The following should work.

qs.appendWhere(new SearchCondition(EPMDocument.class,
"versionInfo.identifier.versionId", "=", "A", false));


Thank you and have a great time.
Best Regards
Swamy Senthil
Principal Solutions Architect, Swasen Inc
swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);

On 04/11/12 11:47, Swamy Senthil wrote:
> The following should work.
>
> qs.appendWhere(new SearchCondition(EPMDocument.class,
> "versionInfo.identifier.versionId", "=", "A", false));

That works. Thanks.
I also found that by doing an InfoReport.sh on wt.epm.epmdocument.

The call I opened with PTC came back with this:
qs.appendWhere(new SearchCondition(EPMDocument.class, Versioned.VERSION_INFO +
"." + VersionInfo.IDENTIFIER + "." + "versionId", SearchCondition.EQUAL, "A"),
null);
Which also works. Just exactly where they pulled this one from I don't know.

>
>
> Thank you and have a great time.
> Best Regards
> Swamy Senthil
> Principal Solutions Architect, Swasen Inc
> swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
> 908 6561(F);
>
> -----Original Message-----
> From: Randy Jones [
> String rev = "A";
>
> QuerySpec qs = new QuerySpec(EPMDocument.class);
>
> //This part works
> qs.appendWhere(new SearchCondition(EPMDocument.class, EPMDocument.NUMBER,
> SearchCondition.LIKE,
> epmNo), null);
>
> //This is the part that does not work: "EPMDocument.REVISION cannot be
> resolved"
> qs.appendW...

















Top Tags