Announcements
No record found.
Hello:
I have an AOT query which has a datasource node pointed to InventTrans. I'd like to add a Ranges conditional where StatusIssue = 1 OR StatusReceipt = 1. I assume adding two Ranges with each pointed to a specific field and value would equate to an AND. Thank you!
It can be done by Using Expressions in Query Ranges.
Alternatively you could use a union query (combining one selection for StatusIssue and one for StatusReceipt), or you could create a view with a computed column (combining StatusIssue and StatusReceipt) and filtering by this computed column.
Just to clarify, so if I add a Ranges node to my AOT query, I can then simply add an expression such as
((StatusIssue == 1) || (StatusReceipt == 1))
So regardless of which of the two fields I choose in the Field property, I can still reference the other?
Hi Ichiban,
Your confusion is similar to this thread, you can look at Martin's detailed explanation.
community.dynamics.com/.../addrange-with-and-and-or-conditions
www.axaptapedia.com/Expressions_in_query_ranges
I'm not sure I understand. My issue is with an AOT query; I'm not building X++ code.
Where you using this query?
Wherever you using this AOT query, you can apply ranges by getting query.
Query q = new Query(queryStr('AOTQueryName'));
As explained above you can then apply complex ranges using Expression, but yours look simple
Please check,
https://docs.microsoft.com/en-us/dynamicsax-2012/developer/using-expressions-in-query-ranges?wt.mc_id=5000414
The query is actually already wrapped in a View. The view is called from X++ code. I'm hoping to just add the Range to the query, but worst case, I can filter it out after calling the view, but probably not best approach to limit records returned.
Isn't an union query the best solution in your case?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 658
André Arnaud de Cal... 468 Super User 2026 Season 1
Syed Haris Shah 333 Super User 2026 Season 1