After clicking Acquire Filter this popup will appear. It has several fields and buttons
Program *
|
Allows the user to select the part of the program that the plugin needs to access. The program selected will filter down which modules will appear in the module list
|
Module *
|
Allows the user to select the module this plugin is for. Selecting the module causes the program to begin building the filter
|
Use or Modify an Existing Filter
|
This allows users to select a filter that was saved in the selected Module in Lucity Desktop or Web.
|
Database Syntax
|
This displays the current SQL Statement that the filter will use. This will appear whether the user is manually writing the SQL or has selected a saved filter.
|
Select reserved word
|
Allows the user to select a reserved word to use in the filter. Reserved words can be used to add specific types of dynamic data to the filterset.
Example: If you wanted to show today's work orders you could create a filter that said: SELECT * FROM WKORDER WHERE WO_STRT_DT = '9/26/2012'. On September 26 it would show all the work orders for that day, but this would be useless on any other day, and would have to be changed daily to be useful. However, using reserved words you could create this filter SELECT * FROM WKORDER WHERE WO_STRT_DT = '%CURRENTDAY%'. Every day the SQL would change to reflect the current day, and only show work orders for that day.
|
Test "Where"
|
This tests if the SQL statement's "Where" clause is valid, and tells how many records that filter returns.
|
OK
|
Saves the filter and closes this window
|
- Click the Acquire button. The following window will appear:
- Select a Program and Component from the drop down lists. This is required at a minimum.
- If the filter is being created for Asset Hierarchy Tree or Crystal Report the Program and Component fields are locked to the selections made on the Add Plugin window.
- Notice that a basic SQL Statement will appear in the Database Syntax field below.
- There are two options when choosing a filter:
- Select an existing filter that was created in Lucity Web or Desktop.
- Check the Use or Modify an Existing Filter box. The two boxes below will become enabled.
- Choose the File Author. A list of all that user's filters for the selected module will be displayed in the Filter Name list.
- Select a filter from the Filter Name list.
- The SQL statement for that filter will appear in the Database Syntax field in the next section. This SQL statement can then be altered if desired. This will not modify the filter inside of Lucity Web or Desktop
- Manually enter the SQL statement in the large Database Syntax field.
- Modify the filter that is currently showing in this field to select the desired record set.
- To search for, and enter a Reserved Word, Table Name, or Column Name click in the Database Syntax field where that object should go. Then select the word, table, or column from the dropdown lists found below the Database Syntax field. When selected they will automatically be added to the SQL statement.
- After creating the desired filter click the Test "Where" button. A popup will appear saying if the statement was valid, and how many records it returned.
- When the filter is complete and works click OK.
Restrictions: Dashboard filters cannot contain ORDER BY clauses. The program will strip out the ORDER BY clause if you try to use one. Additionally, if you are using a Filter to access the Desktop application, be sure that WHERE clauses are in uppercase. This is required for the desktop app.