Hello:
I really hope I'm able to describe this question properly. Please bear with me.
The example scenario: I have an AOT query with SalesLines as the main datasource. For the given item (variant) on each line, I'm looking for the a unit cost value for this item which either: 1) comes from the price on the last PO for this item (variant), OR 2) a value tied to the customer on this sales order. Structurally, on the query I would have two views under Sales lines, one responsible for gathering the PO price, while the other gathers the customer price. And so to recap the query structure, it has two levels only: Sales lines at the top, then under it, the two views as described above.
The question I have is this: the price values the two views gather are mutually exclusive but is prioritized in the sense that if I have a PO value, I don't need the customer-specific value. Only in the case when I'm not able to retrieve a PO value do I look to the customer-specific value. Is it possible within the AOT query to configure it in such as way that if I have a non-zero value returned from the PO view, the AOT query should ignore the customer-specific view. You may be asking why I might want to do something like this. Let's say the two views have a multitude of considerations / conditions to consider in retrieving each value, so to reduce the complexity of the ultimate query to SQL, and reduce the overall processing time, I want to selectively run the second view only if the first view returns a zero value.
Hopefully that made sense.
Thank you!