Share via


Add additional tables to advanced queries

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Complete the following procedure to include additional tables in the query.

  1. In the form where you want to apply an advanced filter, press CTRL+F3 to open the Inquiry dialog box.

  2. Right-click the table name in the Structure section.

  3. From the drop-down list, choose a table to include in the query.

Note

All tables in the drop-down list either have a one to many (1:n) or a many to one (n:1) relationship with the selected table.

In a 1:n relationship, each field in the selected table have one or more related records in the other table.

In an n:1 relationship, one or more fields in the selected table are related to the other table.

Example

You want to find a line in a Sales order that has an important note attached, but you have forgotten both the order number and customer name.

You decide to print the Order lines report, using advanced query options, but when you try to specify the query range, you realize that there is no field in the Order lines table related to document references. You must add an additional table to your query.

  1. In the Structure section, right-click the Order lines table, point to 1:n, and then select the table Document references.

  2. Select the Range tab, select the Document references table, Select Type in theField list, and then select Note in the Criteria list.

When you run the Order lines report, you only get the order lines with notes attached and can select the one you were looking for.