Creating a Data Filter
When you create a data filter, you specify the list that contains the fields you want to filter, the values for each field, and the users who have access to the filter.
To create a data filter
- Access the Data Filter portlet (Accessing the Data Filter Portlet).
- Select the portlet to which you want to apply the data filter.
- Click Submit.
Civic Platform displays a list of the filters defined for that portlet.
- Click New to create a new filter.
Civic Platform displays a blank form.
- Enter a name and description to help you identify the purpose of the data filter.
- In the Search By section, do
the following:
- Use the first drop-down to select the Field you want
to filter.
Note:
The portlet you select at the beginning of this procedure determines which filter fields are available in this drop-down:
-
The filter fields for the Record List portlet include all the fields that display in the record search form, any custom fields, Address/Parcel/Owner (APO) template fields*, and module.
*Please note that only record-searchable APO template attributes are available.
-
The filter fields for the Reference Address (Parcel, or Owner) portlet include the address (parcel, or owner) fields, and APO template fields.
-
The filter fields for other portlets are the fields that display in the search form for each portlet.
-
If you select Custom Fields as the filter field in the drop-down, Civic Platform displays the Custom Fields groups page. Select a Custom Fields group code, and then find and click the desired field in the navigation tree to specify the field you want to filter.
-
If you select Address Template, Parcel Template, or Owner Template as the filter field in the drop-down, Civic Platform displays all the active template attributes. Click the desired attribute to specify the field you want to filter.
-
-
Use the second drop-down to select the Relational Operator you want to use. See Relational Operators.
-
In the third field enter the Value you want to compare the field against. The value must match a value in your agency’s database. You can click the button to the right of the field and select a variable from the Variable picker, or enter the variable into the field manually.
-
If you select a user name field such as Requestor, Civic Platform displays three fields where you can specify the first, middle, and last name of a person. See User Name List Portlets and Search Fields.
However, if you pick a variable as the search criteria, Civic Platform turns the three fields into a read-only Full Name field and populates the field with the specified variable.
-
-
If you are filtering additional fields, enter the logical operator in the fourth field to determine how you want to combine the field-level filters. See Logical Operators.
- Use the first drop-down to select the Field you want
to filter.
If you are filtering more than one new field:
- Click the New Field button located at the top of the portlet.
Civic Platform adds a condition to the Search By section for the additional field.
- Repeat for every new field.
- Click the New Field button located at the top of the portlet.
- To delete a field from your query, select the field and click Delete Field.
- Click the Preview SQL button to view the SQL in the Resulting Query text field.
Click Submit.
Civic Platform displays a message informing you whether you created the data filter successfully, and updates the data filter list.
Table 1. Relational Operators Operator Description != Not equal to < Less than <= Less than or equal to = Equal to > Greater than >= Greater than or equal to IS NOT NULL Used to query fields that contain any value, regardless of what that value is. When you use this operator, do not use a variable in the third field.
IS NULL Used to query fields that do not have a value. For example, you might set up a data filter to query for records associated with a certain department, but not to any individual within the department. When you use this operator, do not use a variable in the third field.
Like The alphabetic character field values that you want to include in the filter or query contain a string (alphabetic characters). For example, if you want to set up a query to list all contacts with the string “Jeff” in their email addresses, choose “Like” as the relational operator and enter “Jeff” as the value.
List Portlet | “Search By” Field |
---|---|
AMS Asset CA List | Inspector |
AMS PM Schedule Log List | Processed By Staff |
Inspection Conditions of Approval List | • Action by User • Applied by User |
Inspection List | • Inspection Contact Name • Inspector • Requestor |
My Workflow Task List | • Action By (Staff) • Assigned to Staff |
Record Conditions of Approval List | • Action by User • Applied by User |
Record Inspection List | • Inspection Contact Name • Requestor |
Set Conditions of Approval List | • Action by User • Applied by User |
Variable | Name | Description |
---|---|---|
$$DEPARTMENT$$ | Department | The department to which the current user belongs. |
$$GAUSER ID$$ | User ID | The logged in user’s ID. |
$$USERFULLNAME$$ | User Full Name | The logged in user’s full name. |
$$GROUP$$ | Group | The logged in user’s user group. |
$$MODULE$$ | Module | The name of the module for which the alert you created the alert. |
$$ORGANIZATION$$ | Organization | All organizations. A Citizen Access term. |
$$OWNORGANIZATION$$ | Own Organization | The logged in citizen user’s organizations. A Citizen Access term. |
$$OWNLICENSE$$ | Own License | The logged in citizen user’s licenses. A Citizen Access term. |
$$PUBLICUSER_EMAIL$$ | Public User’s Email | The logged in citizen user’s email. A Citizen Access term. |
$$SERV_PROV_CODE$$ | Service Provider Code | The logged in user’s agency code |
$$TODAY+/-#$$ | Today | Today’s date, based on the workstation's system clock. You can use this variable parameter in calculations to specify a date range. For example, you could enter $$Today-7$$to query for all records over the last week. |
$$TODAY+n$$ | Today +n | Date range beginning with today’s date. For example, you could enter $$Today-7$$to query for all records over the last week. |
$$USERID$$ | User ID | The ID of the user currently logged on to Civic Platform. |
Operator | Description |
---|---|
And | Use this logical boolean operator to display values included only in multiple fields (results in a smaller list of matches). |
Or | Use this logical boolean operator to display values included in one field or another (results in a larger list of matches). |
Editing a Data Filter
This section describes how to edit the data filter information that displays on the Data Filter tab.
To edit a data filter
Access the Data Filter portlet (Accessing the Data Filter Portlet).
Select the view with the data filter you want to modify.
Click Submit.
Civic Platform displays a list of the filters defined for the selected view.
In the Name column, click the link of the filter you want to edit.
Civic Platform displays the filter details in the record tab.
Modify the following fields if you want:
Name Enter a brief name to identify the data filter. Description Enter a description to help you identify the purpose of the data filter. Review and edit the Search By section:
To delete a field from your query, select the field and click Delete Field.
If you want to modify the filter condition for a field, find the target field, select the new Relational Operator you want to use for the field, and enter the new Value that you want to compare the field against.
If you want to add a new field, enter the Logical Operator in the last field to determine how you want to combine the field-level filters, click the New Fieldbutton, and perform the following:
Use the first drop-down to select the Field you want to filter,
Use the second drop-down to select the Relational Operator you want to use.
In the third field enter the Value that you want to compare the field against. The value must match a value in your agency’s database. You can click the button to the right of the field and select a variable from the Variable picker, or enter the variable into the field manually.
Repeat the preceding step for every new field.
Click the Preview SQLbutton to view the SQL in the Resulting Query text field.
Click Submit.
Civic Platform displays a message informing you whether you updated the data filter successfully.
Deleting a Data Filter
This section describes how to remove a data filter from Civic Platform.
To remove a data filter
Access the Data Filter portlet (Accessing the Data Filter Portlet).
Select the view with the data filter you want to delete.
Click Submit.
Civic Platform displays a list of the filters defined for the selected view.
Select each data filter you want to delete.
Click Delete.
Civic Platform updates the data filter list for the selected view.