Using the toFilter() function

As Shibumi has introduced new sections to display data, we have also introduced new methods for filtering data. Depending on solution configuration:

  • Users can manually filter content in table, list, and view sections (e.g., filter a table of Milestones to show milestones owned by a specified user).
  • Users can use Page Filters to filter multiple sections on a layout at the same time (e.g., filter all card, chart, and table sections to show data for a specified Workstream).
  • App Admins can define default filters for sections or could “lock” a filter so that users cannot change it (e.g., lock the filter for a table that is designed to show only High priority RAID Log items).

When sections are defined to react to page filters, to have a default filter referencing an attribute, or to have a locked filter referencing an attribute, the syntax for the filter should include the toFilter() function to ensure the results match the attribute value.

toFilter() helps to structure the value of the attribute in a filter-friendly format. E.g., referencing a text attribute returns the value held in the text attribute but referencing the text attribute using the toFilter() would return the value held in the text attribute surrounded by quotation marks.

Note: When quotation marks are used in a filter expression, only exact matches are returned.

  • Priority = High would return work items with priority set to: High, Medium High, or Extremely High
  • Priority = “High” would return only work items with priority set to: High

Specifically, toFilter() will return:

  • Text values surrounded by double quotes to allow for exact match filtering.
  • Multi-select pick lists with selected options surrounded by double quotes and separated by commas.
  • Dates formatted as “yyyy-MM-dd”.
  • Numbers resolved to the raw numeric value without any formatting.

The screen shot below provides an example of a chart filtered with and without the toFilter() function.

For more information about this function, please review the toFilter() support site article.

Updated on April 8, 2024

Related Articles