Help Center>Studio v11 (Foundation)

Define criteria

define criteria step of choose define map submit approve run process

By applying criteria to one or more fields, you narrow your query to return only the information that you want.

  1. Click the Criteria tab, and select the first field that is listed. If necessary, change the padding option and the source for look-up values.
  2. padding and lookup source options for a field

    (If you do not see these options, hover over the field.)

  3. Choose an operator for the field.

    For example, to return data for a set of material numbers that begin with 100-, click Like.

    In Studio v11.x, the Between operator includes both of the specified values as well as the values between them.

    In Studio v11.2, the Between operator appears as >=*=< to represent that it is inclusive in Studio v11.x.

    The Between operator for Studio v10.x scripts that are run in Studio v11.2 appears separately as A > 2 and A < 3 to represent that it is not inclusive.

    Studio v11.2 converts the v10.x From-To operator to Between; v10.x will display the v11.x Between operator as From-To.

    If you are using an InfoSet, P-type fields can use only the = operator. S-type fields can use any operator.

  4. Do one of the following:
    • Enter the value. In the example, the value would be 100-*, where * is a wildcard.

      If you want this value to be the same every time the query is run, click the arrow and then click Fixed Value.

      Otherwise, the value is User-Defined, which means it can be set by the person who is running the script.

      To ensure that a value is always entered in User-Defined criteria, click the Required icon.

      asterisk shaped required icon

    • Excel only: If you want Query to use a value that is already in the Excel file, type the column or cell, click the arrow, and then click Cell.

    For more information, see Use the In operator and The Like operator and wildcard characters.

  5. To add more criteria to a field, select the field and click Add Condition on the ribbon.
  6. To add a field, click the plus sign next to Find All Items, and then click the field name.

    If the field was not originally selected as a criteria field in the workspace, Studio automatically selects it.

In an InfoSet, you can add an Or condition to an S-type field. You cannot add conditions to P-type fields.

In an LDB, you can add one Or condition to a field.

A query statement cannot exceed 65,536 characters.

Preview the run

  1. Click the Run Time tab to see a preview of the Run Time Variable Wizard, which runners will see when they run the script.
  2. Enter or change the values for any user-defined criteria.
  3. Click the Preview Run button at the lower left of the Run Time box.

If the results in the Data Set panel match the data that you want to download, the next step is to map the fields.