Filter editor

From Resco's Wiki
Revision as of 12:47, 26 September 2019 by Jzambor (talk | contribs) (grammar)
Jump to navigation Jump to search

Several Resco tools include a functionality that allows you to define conditions that allow you to filter the records used or displayed in the app. For example:

Overview

These are the main functions of the filter editor:

  • Define conditions, group them with logical operators AND or OR.
  • Define the order of the records.
  • Restrict the maximum number of records.
  • Export or import filters in XML format.

Essentially, filter editor allows users to build database queries or fetches without knowing the syntax of FetchXML.

Define conditions

Each filter starts with an entity. Without additional configuration, it returns all records of that entity. If you specify a custom sort order, it is also displayed, for example:

account
contact SORT: lastname, firstname

Click Add Condition, select one of the entity fields and a condition operator, for example:

modifiedon This Month

Some operators require additional arguments, for example:

address1_city Equals Prague

Sometimes you need to filter the records of an entity using information from another entity. Click Add Link and select a related entity. Choose the link type as inner or outer join. You can add conditions to this related entity, and also set sort order or restrict the maximum number of returned records. For example, the following view filter shows only those accounts that have an opportunity created within the last 10 days.

Account
Opportunities inner
Created On Last X Days 10

Additionally, you can decide, how your conditions should be evaluated and grouped:

  • AND operator: all grouped conditions must be met
  • OR operator: at least one of the grouped conditions must be met

Define sort order and restrict count

Users usually can modify the sort order in the app, but for example in case of a view, it makes sense to define a valid default sort order. You can also define sort order for related entities that you added via Add Link.

  1. Click Edit Sort to open the Configure Sort Fields window.
  2. Choose the primary column (for example, Name) and the sort order (for example, Ascending).
  3. Click Add if you want to another column for sorting. Click Del to remove it.
  4. Click OK to save your changes.

In some cases, you don't need to find all records, only top five (ordered by a relevant criterion), or even a single one. To restrict the maximum count of records, click Edit Count, enter a value, and then click OK.

Save and share filters

Once you're done editing, click Save or Save & Close.

If you want to reuse the filter in another location, click Export XML to download the filter in XML format (FetchXML). Change to the other location, for example to a different app project, and click Import XML to reuse the filter there.