PLM Developer
Development

Current, Latest, Released, Effective: Aras Query Types Explained for Developers

Nithish Pandian •
#AML#query#revisions#data consistency#troubleshooting
Aras Innovator Query Types Diagram

Inconsistent query results when retrieving Parts in Aras Innovator can derail development efforts, wasting hours debugging what appears to be environmental issues. The root cause often lies in misunderstood Query Type behavior, which silently determines which revision of an item is returned. Mastering these settings is essential for reliable PLM applications.

As enterprises increasingly rely on automated integrations and headless PLM operations, predictable data retrieval becomes critical. The Query Type parameter serves as a gatekeeper for revision control policies, affecting everything from simple searches to complex BOM traversals. Understanding its nuances prevents subtle but costly data inconsistencies.

What You Will Learn

Implementing Consistent Query Behavior

Understanding Query Types

Aras Innovator provides four Query Type options that control revision selection:

  1. Current: Returns the revision currently checked out (if any) or the last released revision
  2. Latest: Always returns the most recent revision regardless of release status
  3. Released: Returns only the most recent released revision (filters out works-in-progress)
  4. Effective: Returns the revision that was current at a specified point in time (requires effective_date parameter)

Explicit Query Type Specification

Always declare the Query Type in AML queries to prevent unexpected default behaviors:

<!-- Recommended approach: Explicit Query Type -->
<Item type="Part" action="get" queryType="Released">
  <item_number>12345</item_number>
</Item>

For server-side JavaScript methods, set the queryType property:

var partItem = innovator.newItem("Part", "get");
partItem.setProperty("item_number", "12345");
partItem.setProperty("queryType", "Released");
return partItem.apply();

Default Behavior Risks

When Query Type isn’t specified:

This inconsistency explains why the same search can return different revisions in different contexts.

Common Pitfalls

Key Takeaways

Understanding and properly implementing Query Types eliminates a common source of debugging frustration in Aras development. For deeper exploration, review the official Aras documentation on Revision Control and the AML Reference Guide. These resources provide additional examples and edge case handling for complex scenarios.

← Terug naar blog