2001-107 – Initiate and Run a Query

Initiate the Query
For this example, the query will be executed from the Material details window. Open the ‘Material Details’ window and press <F11> to activate query mode. For this example, we will be using the BY query function. Once the query details are entered, press <F12> to run the query. Once the query has been run, the number of items in the query is displayed at the top of the window (as below).

Export Query Data
With the query window still open, navigate to the HOME tab in the Opto ribbon and click on the Export to Excel icon to open the Export Data table window. Select a ‘Definition Name’, then click on the Export button (circled below) to export the query data into an excel spreadsheet.

Once the query has been exported, the Excel spreadsheet will need to be saved to a location on your PC.

Examples of a query are as follows:

List Inventory Parts that are required to be manufactured – Open the Manufacturing module and then click on the ‘Parts Details’ icon – (Initiate and execute query as above), enter >0 in the ‘To Order’ field. This will display the first of the parts list required for manufacture with all details displayed. The total number of parts that are within the selected criteria is displayed (e.g. 1 of 50 at the top of the window after the query has been run).

List All Clients or Suppliers – Open the Core Data module and click on either the ‘Clients’ or ‘Suppliers’ icon (Initiate and execute query as above), enter BY in the ‘Client Code’ or ‘Supplier Code’ field. This will display the first of the Clients or Suppliers with all details displayed. The total number of Clients or Suppliers is displayed (e.g. 1 of 250 at the top of the window after the query has been run).

List All Clients without an ABN number – Open the Core Data module and click on either the ‘Clients’ (Initiate and execute query as above), enter =” or =”” in the ‘ABN’ field. This query will only display all Clients without ABN numbers.

List All Clients with Export Name – Open the Core Data module and click on the ‘Clients’ icon, click on the “Client Info” (Initiate and execute query as above), enter <>” or <>”” in the ‘Export Name’ field. This query will only display all Clients with an Export Name.

Query Search Option

Symbol Search Field that Example Result
[] followed by data criteria Containing data []ABC Finds all items in the selected field containing ABC
] followed by data criteria Starting with ]ABC Finds all items in the selected field starting with ABC
[ followed by data criteria Ending with [ABC Finds all items in the selected field ending with ABC
; separates data criteria Matching either data ABC;200MM Finds all items which contains either ABC or 200MM
> followed by data criteria Data greater than This could be in relation to measurement, dates, or a number sequence.
< followed by data criteria Data less than
<>”or <>”” Data field not empty Find all selected fields that have data.
=”or =”” Data field empty Finds all selected fields that are empty in the selected records.
>= ???&<=??? All data equal to or greater than the first data and less than or equal to the second data.
By All data in alpha or numeric order
By-dsnd All data in descending order
By1 All data sorted by this field first
By2 All data sorted by this field second

Function Keys

Keys Action
<F11> Initialise a Query Report
<F12> Execute a Query by Report
<Ctrl-F> Go to first record of the Query
<Ctrl-P> Go to previous record of Query
<Ctrl-S> Close current
<Ctrl-N> Go to Next record in the Query
<Ctrl-l> Go to Last record in the Query
Sort Query by selected fields – Ascending or Descending
Run Ad-Hoc Report icon or <Ctrl+R> can then generate a required report on query criteria.
Excel icon or <Ctrl+R> enables the user to export the data to a Microsoft Excel Spreadsheet.
Word icon or <Ctrl+E> enables the user to export the data to a Microsoft Word Document.
Opto Software Pty Ltd
Created: 04/11/2025