Axapta views query

Hi All,

I have created view by using query:

in InventTable i have one record for the item “ABC” in InventTableModule we have two records one for Module type inventory and one for Purchase order but in view i need only one record for example:

Currently in view

ItemId ModuleType Unit Id

ABC inventory Each

ABC Purchase order CS12

Requirement

ItemId InventUnit Id PurchaseUnitId

ABC Each CS12

How can i achieve this???

To filter out some records, add a range to your query. It seems that you want to filter by ModuleType field, therefore add it to the Ranges node of the data source and set the value you want.

Hi Martin,

Thank you so much for your guidance J

Let me take item “Computer” from inventTable, let me assume there is one record in this table for the item “Computer”.

In inventTableModule for the Item “Computer” we have two records

One for the module type Inventory and it Unit id is “EACH” and other one is for “purchase order” and its unit ID is CS12 and currently in query I have added “InventTable” and “InventTableModule” with innerjoin and in view it displays me as two separate records

ItemId ModuleType Unit Id

ABC inventory Each

ABC Purchase order CS12

But in view I need this information in one record which contains both modules Unit Id:

ItemId Unit Id[Invenoty] Unit Id[Purchase Order]

ABC Each CS12

I want to merge the two record information as a one record in view.

Ah, sorry, I didn’t noticed what you actually want to achieve.

The only way I can think of is a computed column with a subquery. You’ll find an example in AX2012: Subqueries in views.

Thanks Martin!

Let me explore this and get back to you :slight_smile: