Generic Inquiries, or GIs for short, are lookup tables that display important form information such as dates, customers, statuses, etc. In Acumatica, you can create or customize your own GI and add more features that will allow you to leverage your data. The GIs are powerful in Acumatica – you can use them for reporting (dashboards and reports) and extend them to external applications such as Tableau or Power BI through OData.
In Acumatica, you can look up default GIs by clicking on a form option such as Sales Orders, Invoices, or Customers. Once you click on that form option, a table displays all the entries of that form type, along with relevant data such as the description, status, creation date, customer, etc. But if you would like to add more information, say, to add Shipping Information to the Invoices GI for a specific customer that wants to receive statements with this information, here are the steps you would take to create it.
Creating a Generic Inquiry
In order to create the outer shell of the Generic Inquiry, go through the following steps
- Go to More Items on the Workspace and click on Customization under Configuration
- Click on Generic Inquiry
- On the header, in the box for Inquiry Title, enter the name and hit the Tab key
- Select the Make Visible on the UI checkbox
- The Site Map Title (GI Title), Workspace & Category fields are auto-populated, and can be changed if required
- Hit the save button on the header
The View Inquiry button takes you to a blank GI that you can populate with data using the following steps. You can locate the GI by its Workspace Category – in this example the GI falls within Receivables on the Workspace.
Adding a Table
GIs use form data to draw information from. Adding a table to the GI sets the base from which data can be populated. To add a table to the GI, follow the steps shown below.
- Click on the + sign on the Tables grid, using the selector for the Table Name, choose the table from which you would like to populate the data
- Here we’ve chosen ARInvoice as the table, and on selecting the table, hit the Tab key
To confirm that you’re adding the right table, go to that form and use the Inspect Element tool (Ctrl+Alt+Click) to highlight any field on the screen. Here, we’ve navigated to the Invoices form to make sure we have the right Table Name. The Data Class shows ARInvoice, the table we added to the GI. Inspecting the Shipment Nbr. under the Freight Tab shows us the Data Class for Shipment (SOFreightDetail) that we will add under Related Tables.
Next, to add the specific fields from the table to the GI, go to the Results Grid tab on the GI editor, click on the + sign, select the Object (ARInvoice) and use the Data Field drop-down to select the fields you want to appear on the GI.
Clicking View Inquiry shows the GI with the Data Fields and subsequent data. The Sort Order tab allows you to sort the data using a field. You can look up the Data Field on the form (here, the Invoices form) using the Inspect Element tool.
Adding Related Tables
We used the steps above to pull data from the Invoice table onto the GI. Next, we add a related table, the Shipment table. Acumatica now makes it easy to build related tables.
Highlight the table from the Tables tab and click Add Related Table.
Select the Child Table – we add SOFreightDetail, the table we found on inspecting the Shipment Ref Nbr element. The system shows that docTyp & refNbr are the fields that need to be linked between both tables. Click on Select Related Table and the relation is automatically built. The link below illustrates the types of table joins that are available. On the Related Tables window, click Add.
Types of table joins: https://www.devart.com/dbforge/sql/sqlcomplete/sql-join-statements.html.
The Relations tab shows you the build relationship between the tables. You have the option to change the Join Type.
Now you can go back to the Results Grid tab on the GI editor and add Data Fields using the new SOFreightDetail object.
Adding a Selector
A selector allows you to sort through your GI based on parameters you set. In this example, we create a selector that allows the user to choose a customer, and displays all of the invoices that are linked to that customer.
- Under the Parameters tab on the GI editor, click the + sign
- Select the Schema Field – here we’ve entered ARInvoice.CustomerID – and give it a Name and Display Name and hit save
- Go to the Conditions tab on the GI editor, and enter the parameters as shown in the image below
The first expression, ARInvoice.CustomerID Equals [Customer] will enable you to display (sort) only the customers of the selected Customer ID. The second expression, [Customer] Is Empty, allows you to view the full list of customers (invoices) when no customer is selected. The Or operator allows either one of these conditions to take shape.
Creating a Side Panel
A side panel allows you to browse through specific form data by clicking on a parameter on your GI. To create a side panel, use the following steps:
- Go to the Navigations tab on the GI editor
- On the Navigation Targets pane, choose the screen you want to link to – here we chose AR303000 – Customers, and Side Panel as the Window Mode
- On the Side Panel Settings pane, choose the field and parameter you want to reference the form by – here we chose AcctCD and ARInvoice.CustomerID
- Click save
Now highlighting the row on the GI shows the Customer form on the Side Panel.
To summarize, we first create the GI, add a table and related tables that are built internally by Acumatica, choose the fields to be displayed using the Results Grid, create a Selector using the Parameters & Conditions tabs, and a Side Panel using the Navigation tab. We hope you have fun creating your GI!
Click on the video below for a walkthrough demo to create a Generic Inquiry.