Creating a Data Filter

When you create a data filter, you specify the list that list 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

  1. Access the Data Filter portlet (Accessing the Data Filter Portlet).

  2. Select the portlet to which you want to apply the data filter.

  3. Click Submit.

    Civic Platform displays a list of the filters defined for that portlet.

  4. Click New to create a new filter.

    Civic Platform displays a blank form in the record tab.



  5. Complete the following fields:

    Name Enter a brief name to identify the data filter.
    Description Enter a description to help you identify the purpose of the data filter.
  6. In the Search By section, do the following:

    1. Use the first drop-down to select the Field you want to filter.

      Note:

      The portlet you selected in sets the filter fields available in this drop-down:

      • The filter fields for the Record List portlet include all the record fields that display in the record search form, Application-Specific Info, Address Template, Owner Template, Parcel Template, and Module Name. However, 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 Address Template (Parcel Template, or Owner Template).

      • The filter fields for other portlets are the fields that display in the search form of each portlet.

      • If you select Application-Specific Info (ASI) as the filter field in the drop-down, Civic Platform displays all the ASI groups page. Select an ASI group code, and then find and click the desired ASI field in the ASI Fieldnavigation tree to specify the field you want to filter.



      • If you select Address Template, Parcel Template, or Owner Templateas 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.



    2. Use the second drop-down to select the Relational Operator you want to use. See Relational Operators.

    3. 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.

      See Data Filter Parameters.



      • 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.

    4. 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.

  7. If you are filtering more than one field, do the following:

    1. 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.

    2. Repeat for every new field.

  8. To delete a field from your query, select the field and click Delete Field.

  9. Click the Preview SQL button to view the SQL in the Resulting Query text field.

  10. 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.

Table 2. User Name List Portlets and Search Fields
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
Table 3. Data Filter Parameters
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.
Table 4. Logical Operators
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

  1. Access the Data Filter portlet (Accessing the Data Filter Portlet).

  2. Select the view with the data filter you want to modify.

  3. Click Submit.

    Civic Platform displays a list of the filters defined for the selected view.



  4. In the Name column, click the link of the filter you want to edit.

    Civic Platform displays the filter details in the record tab.



  5. 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.
  6. Review and edit the Search By section:

    1. To delete a field from your query, select the field and click Delete Field.

    2. 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.

    3. 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:

      1. Use the first drop-down to select the Field you want to filter,

      2. Use the second drop-down to select the Relational Operator you want to use.

      3. 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.

      4. Repeat the preceding step for every new field.

  7. Click the Preview SQLbutton to view the SQL in the Resulting Query text field.

  8. 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

  1. Access the Data Filter portlet (Accessing the Data Filter Portlet).

  2. Select the view with the data filter you want to delete.

  3. Click Submit.

    Civic Platform displays a list of the filters defined for the selected view.



  4. Select each data filter you want to delete.

  5. Click Delete.

    Civic Platform updates the data filter list for the selected view.