NetLoan - Add a Custom Filter to a Query Report
Overview
Custom filters extend a query report's filtering beyond the standard filter set, letting you filter results on a field the report's query provides. This article covers creating a custom filter, choosing which report(s) it appears on, and confirming the report's query supports it. A custom filter only works when the report's underlying SQL query exposes the field you're filtering on.
Prerequisites
- An existing query report to attach the filter to (see Create a New Query Report).
- The report's SQL query must include the field/data you want to filter on. If the query doesn't expose that field, the filter will appear but won't change the results. Out-of-the-box reports ship with their query already built; for a custom report, write or adjust the query yourself or have your NetSuite partner help.
- Standard NetLoan access with permission to create custom filter records.
Setup Options
Navigation
- Top navigation:NetLoan > NetLoan Setup > Custom Filters > New to create a new custom filter.
Custom Filter Record
Configure the following on the custom filter record. The report(s) the filter appears on are chosen with the Report field on this record.
Record ID: customrecord_da_custom_filter
| Field Name | Field Type | Description | Dependencies | Options / Example | Field ID |
|---|---|---|---|---|---|
| Field Label | Text | The label shown for the filter on the report. | None | Period End Date | custrecord_da_cf_field_label |
| Field Type | Select | The input type presented to the user for this filter. | None | Date; Currency; List/Record; Free-Form Text; Integer Number; Checkbox; Multiple Select | custrecord_da_cf_field_type |
| Field Source | List/Record | The record or list the filter draws its selectable options from. | Used when Field Type is List/Record | Subsidiary | custrecord_da_cf_field_source |
| Operator | Select | The comparison applied when filtering results. | None | On; Within; Equal To; Any Of; Between | custrecord_da_cf_filter_operator |
| Filter Name | Text | The field the filter targets. This must be present in the report's query for the filter to take effect. | Must match a field in the report's query | transaction_date | custrecord_da_cf_filter_name |
| Suitelet | Select | The suitelet the filter applies to. Select the report suitelet to use the filter on query reports. | None | NetLoan Report Generator | custrecord_da_cf_suitelet |
| Report | List/Record | The specific report(s) this filter appears on, so it shows only where it's relevant rather than on every report. | Suitelet set to the report suitelet | A specific query report | custrecord_da_cf_report |
Optional fields: Mandatory (custrecord_da_cf_field_mandatory) to require a value, Default Value (custrecord_da_cf_default_value) to pre-fill the filter, and Field Help (custrecord_da_cf_field_help) to show help text on the filter.
If you leave the Report field blank, the filter applies to every report on the selected suitelet. Set it to one or more specific reports so the filter only shows where it belongs.
A custom filter whose Filter Name field isn't present in the report's query will appear but won't actually filter the results, so confirm the query includes that field.
Use Case Specific Setup
Use Case: Filter by accounting period
To let users filter a report's results to a specific accounting period, for example a period-end subledger report:
| Field | Setting | Example | Notes |
|---|---|---|---|
| Field Label | A user-facing label | Period End Date | The label users see on the report |
| Field Type | Date | Date | Presents a date picker |
| Operator | On | On | Matches results to the selected period date |
| Filter Name | The query field for the period/transaction date | transaction_date | The report's query must include this field |
| Report | The target query report | Period-End Subledger Report | Keeps the filter off unrelated reports |
Use Case: Restrict a filter to a single report
When a filter only makes sense for one report:
| Field | Setting | Example | Notes |
|---|---|---|---|
| Report | The single applicable report | Overdue Payment Report | Prevents the filter from showing on every other report |
| Filter Name | The field that report's query exposes | loan_id | Confirm the field is present in that report's query |
