MO Selection Query

Core Utilities MO Selection Query

HelpID: 715822029

The MO Query window is opened by clicking on the “MO Selection Query” link in the Settings section of the window.

The MO Selection Query window is used to control which records are processed by the Core Utilities from the staging tables (the Excel imports populate the SQL staging tables). By default, the Core Utilities process records in order by the “MONum” column.

The MO Selection Query settings are saved by User ID, so if multiple MOGen processors are running each one could have a different selection query. For example, a selection query might restrict a MOGen processor to records for a specific Site.

Receipt Date On/Before User Date: this is not used by the Core Utilties. It is only for MO Receipt Integration.

Selection Query

The query can be created using fields from W7158ImportHdr (Import Header) or W7158MOGen2 (Core Utilties Generation 2).

The Table/Field picker can be used to help select correct field names, but the query can also be manually entered into the text field.

If you use a subquery, as shown below, the table names must be fully qualified.

‘SA’ = (select USER2ENT from T120..SOP10100 (nolock) where SOPNUMBE = T120..W7158MOGen2.DSCRIPTN)

In this example, T120 is the company database name. The query above selects records where “SA” created a SOP Document and the SOP Number is stored in the DSCRIPTN field.