Adding runtime Prompts to a filter statement

So you want to create a filter statement that will select specific data like a Batch, Lot, Run or Order number from a QW Application when you run a View.  The process is quite simple.  You can do it by clicking on the Filter Button on the Tool bar near the top of the screen in any QW Application.  That opens the Views Filter Window.

In this example we will filter or select data based on a specific Batch Number.  This means only data for the Batch Number you entered will be included in the new dataset displayed in QW5.  To do this click once on the Variable box and a list of Variables from the QW application will be displayed.  We will select V7- Batch Number by putting the cursor on that variable and clicking once.

Adding runtime Prompts to a filter statement

Now notice there is a Cond. header next to the Variable field.  This allows you to select the Condition that best meets your need.  In this case we will use =.  Take the time to review the other possibilities as they can be very useful in different filters you may want to create. Also be aware that the From/To Time constraints will also be in effect, so you may need to change those as well, as they work in tandem with the filtering conditions.

In the Value field you have a few choices:

  1. If you click the down arrow on the right side of the box you will see a list of all the values for Batch Number in the application.  Useful if you are not sure the value you are looking for.
  2. You can enter a specific value like 1347 if you know it.  The problem is when you save this View and rerun the filter it will look for this value again unless you change it first.
  3. The best method to prompt a user for a different value each time the query is run, is to place a ?(question mark) in the value field.  When the query is run you will be prompted to enter a value.  A very nice way of limiting the number of Views you would have to create.

Entering Run Time Parameters

If you have a value stored in a Quality Window Input File, or want to pick up a value from a DDE or OPC server, simply prefix the filename or address with an ‘@‘ symbol into the Value field, and then at run time, the current value of that filename or address will be used in the filter.Example:  @c:\MyFiles\  or  @DDE:MyProgram|MyTopic!MyItem.

Unlock your data with QW6 SPC Software

Smart teams know the key to improved results is unlocking data that will show you where to look. Give QW6 a try for free and gain the visuals and statistics that can lead your path to success.

Translate »