Skip to main content

Version: 20.05 (EOL)

Global Filters

The globalFilters config is used to show/hide and configure global filters in the List screen. Workspaces supports three global filters: GroupName, FormName and DateCreated.

info

While globalFilters is not mandatory, if it's not set then all queries will have a dateCreated range from one year before the current date to the current date inclusive.

Options

GroupName

The GroupName option is used to show/hide the Group Name select that allows Workspaces users to filter Txns by group names. The Group Name select presents a list of items to the user populated from the globalActions.GroupName.options property.

FormName

The FormName option is used to show/hide the Form Name select that allows Workspaces users to filter Txns by form names. The Form Name select presents a list of items to the user populated from the globalActions.FormName.options property.

DateCreated

The DateCreated option is used to show/hide the Date Created input that allows Workspaces to filter Txns by a date or date range based on date created.

Attributes

For a list of supported attributes, see Reference > CurrentSpaceGlobalFilters.

Example

The following example shows how to configure the label, options and value for the various global filters.

src/configs/custom/process.ts
import { ConfigCurrentSpace } from '@transact-open-ux/workspaces/dist/types';

export const processConfig = ({ date }: any): ConfigCurrentSpace => ({
...
globalFilters: {
GroupName: {
label: 'Queues',
options: ['Error Review', 'Fraud Review', 'Manual Review'],
value: 'All',
},
DateCreated: {
label: 'Created Date',
value: [date('4 weeks ago'), date('now')],
},
},
...
});

export default processConfig;