Forum Discussion
christopher_gillis
9 years agoCommunity Manager
Hello,
I can confirm that an AML query using the generation property in a where clause does not seem to return the expected results. That being said, it is possible to perform this same query using the following AML.
<AML> <Item type="Part" action="get"> <generation condition="gt">0</generation> </Item></AML>
Additionally, in recent versions of Innovator, SELECT statements are blocked from use in where clauses due to security concerns. Typically an error is thrown indicating this. Could you please provide the full AML query that you are using?
That being said, the most recent generation of an Item is always flagged with the "is_current" boolean, so you can perform the same query for an item with the highest generation by using the AML below.
<AML><AML> <Item type="Part" action="get"> <is_current>1</is_current> </Item></AML>
I also want to note that, by default, only the most recent generation of an Item is returned in an AML search unless you are specifically querying on the generation property.
Chris
_________________________
Christopher Gillis
Aras Labs Software Engineer