Skip to content

Commit 9ba2cfc

Browse files
committed
[IMP] spreadsheet: new global filter on checkbox/boolean fields
task-4885903 X-original-commit: 1c8ae73
1 parent e82b4aa commit 9ba2cfc

File tree

3 files changed

+48
-13
lines changed

3 files changed

+48
-13
lines changed

content/applications/productivity/spreadsheet/global_filters.rst

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ customize the view to answer complex business questions spanning multiple data s
1717
.. image:: global_filters/dashboard-global-filters.png
1818
:alt: Global filters at the top of a dashboard
1919

20-
Three types of global filters are available:
20+
Four types of global filters are available:
2121

2222
- :ref:`Date <spreadsheet/global-filters/create-date>`: filters data based on a specific time range,
2323
with the options :guilabel:`Month / Quarter`, :guilabel:`Relative Period`, or :guilabel:`From /
@@ -27,6 +27,8 @@ Three types of global filters are available:
2727
related model.
2828
- :ref:`Text <spreadsheet/global-filters/create-text>`: filters data based on a string of text or a
2929
range of predefined values, e.g., a product reference or barcode.
30+
- :ref:`Yes/No <spreadsheet/global-filters/create-checkbox>`: filters data based on whether or not a
31+
checkbox, or boolean, field is set, e.g., lead is active.
3032

3133
Unlike the standard :icon:`fa-filter` :guilabel:`(Add filters)` spreadsheet function, which lets you
3234
sort and temporarily hide data, global filters act on the underlying :ref:`data sources
@@ -65,8 +67,9 @@ filter should act on, or match with.
6567

6668
Field matching is further explained in the relevant sections on creating
6769
:ref:`Date <spreadsheet/global-filters/create-date>`,
68-
:ref:`Relation <spreadsheet/global-filters/create-relation>`, and
69-
:ref:`Text <spreadsheet/global-filters/create-text>` global filters.
70+
:ref:`Relation <spreadsheet/global-filters/create-relation>`,
71+
:ref:`Text <spreadsheet/global-filters/create-text>`, and
72+
:ref:`Yes/No <spreadsheet/global-filters/create-checkbox>` global filters.
7073

7174
.. _spreadsheet/global-filters/create:
7275

@@ -82,8 +85,8 @@ you are adding filters to a dashboard.
8285
:guilabel:`(Edit)` icon that appears when hovering over the dashboard name.
8386

8487
To add a new filter, click :icon:`os-global-filters` :guilabel:`Filters`, then, under :guilabel:`Add
85-
a new filter...` click :guilabel:`Date`, :guilabel:`Relation`, or :guilabel:`Text` as appropriate.
86-
The :guilabel:`Filter properties` pane opens.
88+
a new filter...`, click :guilabel:`Date`, :guilabel:`Relation`, :guilabel:`Text`, or
89+
:guilabel:`Yes/No` as appropriate. The :guilabel:`Filter properties` pane opens.
8790

8891
When saving a global filter, if any required information is missing or if any information provided
8992
in the :ref:`Field matching <spreadsheet/global-filters/field-matching>` section is not appropriate,
@@ -126,7 +129,7 @@ With the :guilabel:`Filter properties` pane open:
126129
The :guilabel:`Period offset` option, which appears when a date field is chosen, enables
127130
comparisons to be made by shifting the time range by one or more periods in the past or future.
128131
By default, no period offset is defined. To define a period offset, select :guilabel:`Previous`
129-
or :guilabel:`Next`, then select the desired number of periods in the past of future.
132+
or :guilabel:`Next`, then select the desired number of periods in the past or future.
130133

131134
.. tip::
132135

@@ -213,9 +216,9 @@ Text
213216
----
214217

215218
.. note::
216-
A :guilabel:`Text` filter can only match with a :ref:`Text (char)
217-
<studio/fields/simple-fields-text>`, :ref:`Integer <studio/fields/simple-fields-integer>` or
218-
:ref:`Decimal (float) <studio/fields/simple-fields-decimal>` field.
219+
A :guilabel:`Text` filter can only match with a :ref:`Text
220+
<studio/fields/simple-fields-text>` (char), :ref:`Integer <studio/fields/simple-fields-integer>`,
221+
or :ref:`Decimal <studio/fields/simple-fields-decimal>` (float) field.
219222

220223
With the :guilabel:`Filter properties` pane open:
221224

@@ -237,21 +240,53 @@ With the :guilabel:`Filter properties` pane open:
237240
:alt: Global filters set on a pivot table
238241

239242
In the :guilabel:`Filter properties`, the :guilabel:`Possible values` of the filter were
240-
restricted to the range :guilabel:`'Products (List #1)'!A2:A34`. This corresponds to the range
243+
restricted to the range `Products (List #1)'!A2:A34`. This corresponds to the range
241244
containing the :guilabel:`Display name` of the product on a list inserted in the spreadsheet.
242245

243246
.. image:: global_filters/field-matching-text.png
244247
:alt: A text filter with a restricted range
245248
:scale: 80%
246249

247250
With this configuration, the pivot table and chart can be filtered by product name by
248-
selecting one of the predefined values available in the text filter. In this case,
251+
selecting one of the predefined values available in the text filter. In the example,
249252
:guilabel:`Furniture` has already been selected as the :guilabel:`Product category`, meaning
250253
that only products of this category can be selected as possible values.
251254

252255
Furthermore, if the values in the range have been retrieved dynamically from the database, as in
253256
this case, the text filter is also dynamic, i.e., will reflect changes made to those values.
254257

258+
.. _spreadsheet/global-filters/create-checkbox:
259+
260+
Yes/No
261+
------
262+
263+
.. note::
264+
A :guilabel:`Yes/No` filter can only match with a :ref:`Checkbox
265+
<studio/fields/simple-fields-checkbox>` (boolean) field.
266+
267+
With the :guilabel:`Filter properties` pane open:
268+
269+
#. Enter a name for the new :guilabel:`Yes/No` filter in the :guilabel:`Label` field.
270+
#. Optionally, select :guilabel:`Is set` or :guilabel:`Is not set` as the :guilabel:`Default value`.
271+
#. In the :guilabel:`Field matching` section, for each data source, click below the data source name
272+
and select the field the :guilabel:`Yes/No` filter should match with.
273+
#. Click :guilabel:`Save`.
274+
275+
.. example::
276+
In the example below, a :guilabel:`Yes/No` global filter was created to allow the user to see
277+
all opportunities that are active, i.e., for which the :guilabel:`Active` checkbox is enabled
278+
on the record, or all opportunities that are inactive, i.e., for which the :guilabel:`Active`
279+
checkbox is disabled. Leaving the filter empty shows both active and inactive opportunities.
280+
281+
.. image:: global_filters/example-checkbox.png
282+
:alt: Global filters set on a pivot table
283+
284+
In the :guilabel:`Field matching` section of the :guilabel:`Filter properties`, the field
285+
:guilabel:`Active` was assigned as the matching field for the pivot table.
286+
287+
.. image:: global_filters/field-matching-checkbox.png
288+
:alt: A yes/no filter with the Active field set as matching field
289+
255290
Manage and use global filters
256291
=============================
257292

@@ -265,8 +300,8 @@ It is possible to:
265300
.. tip::
266301
Reloading the browser will cause any global filters to reset to their initial state or default
267302
value, as relevant. To refresh data in an inserted list, pivot table, or chart without losing
268-
global filters that have been applied, click :menuselection:`Data --> Refresh all data` from
269-
the menu bar.
303+
global filters that have been applied, click :menuselection:`Data -->` :icon:`os-refresh-data`
304+
:menuselection:`Refresh all data` from the menu bar.
270305

271306
- **Change the order** of existing filters by hovering over a filter and using the
272307
:icon:`os-thin-drag-handle` :guilabel:`(drag handle)` icon to change the position.
Loading
Loading

0 commit comments

Comments
 (0)