Pergapedia / SSP7
SMTX SupportSMTX Wiki
  • Introduction
  • Pergapedia / SSP7 Admin guide
  • Catalog
    • Typical use cases
      • Usage as Knowledge Catalog
      • Usage as Data Catalog
      • Usage as Service Catalog
    • Catalog Maintenance
      • Templates
        • Create a new template
        • Version management of templates
        • ACL (Access Control Lists)
          • Scopes
          • Add default ACLs
          • Remove All ACLS
          • ACL condition script examples
        • Set translation label for Publication request button
      • Parts (Fields)
        • Field types
        • Calculations
        • Field Validation examples
        • Field Visibility Examples
        • Field Filtering
        • Default value
      • Actors
      • Reusable content
      • Settings
      • General Settings
      • Roles
      • Javascript for Variables in processes
      • Action Forms
        • Add log entries for Action Forms
    • Service Maintenance
      • Services
        • Filter list of services
        • Duplicating services
        • Adding a new service
        • Service Details
          • General settings
          • Service Data
          • Contracts
          • Actors
          • Receivers
          • Targets
          • Support Groups
          • Relations
          • Requests
          • Quality Notes
          • Publication History
          • Documents
          • Log
          • Service Actions
        • Compare versions
        • Quality Notes
        • Service Changed flag
      • Approvals
      • Relations
        • Start service from service
      • Subscriptions
      • Outages
    • Public
    • Service Catalog API
      • Outbound REST API
        • Get Services
        • Get Service Details
      • Inbound SOAP calls
        • Create custom approval
        • Add log to service publish request
        • Add person to service person list
        • Add persongroup to service persongroup list
        • Delete service
        • Mark service publish request as in approval state
        • Process service publish request
        • Publish request set can be cancelled
        • Publish request set show in public
        • Remove person from service person list
        • Remove persongroup from service persongroup list
        • Remove support group from service
        • Update service field
        • Update service language field
        • Update template part datetime value
        • Update template part numeric value
        • Update template part text value
  • Fulfillment Platform
    • Admin Panel
    • General Settings
      • General
      • My Profile
      • Mail Settings
      • Login
      • Forms Setting
      • Workflow
      • Archive
      • Calendar Overview
      • Dashboard
      • Mobile Component
      • Ticketing
      • Webhooks
      • Goto
      • Search options
      • Application URL Settings
      • Address Book Settings
    • Dashboard
    • Categories
    • Topics
    • Forms
      • Fields-tab
      • Field: General Settings
      • Dynamic Value
      • Text (Area) Field
      • Yes : No Field
      • Upload file(s)
      • Date (Time) Field
      • Password Field
      • Read Only Display Field
      • Header
      • Tab
      • Section
      • Repeatable section buttons
      • Subform
      • Static HTML
      • Hidden Field
      • Selection Fields
      • Calculations
    • Processes
      • General Settings
      • Dynamic Field Mapping
      • Process Steps
      • Step Types
      • Logging
    • Datastore
      • Process interaction
      • Manage datastore entries via Webservices - Javascript
    • Tasks
    • Auto Forms
    • Adapters
      • Person Data
      • Web Services
    • Event triggers
    • Roles
    • Rolesets
    • Groups
    • Views
      • View Example 1
      • View example 2
    • Mail Templates
    • Layouts
    • Mail queue
    • Reporting
    • External Apps
    • My Items
    • Translations
    • Bulk Uploads
    • Help page
    • Goto
    • Search
    • Inbound Email
    • Reporting Dashboard
    • Ticketing
      • My Activities
      • Ticketing Views
      • External Integrations
    • Release Manager
    • Content Management Console module
    • SSP Studio
    • Persons & Accounts
    • Pools
  • Release Notes
    • Terms and Conditions
      • December 2024
    • Release 7.21.01
    • Release 7.21.03
    • Release 7.21.04
    • Release 7.21.05
    • Release 7.21.06
    • Release 7.21.07
    • Release 7.21.08
    • Release 7.21.09
    • Release 7.21.10
    • Release 7.21.11
    • Release 7.21.12
    • Release 7.22.02
    • Release 7.22.03
    • Release 7.22.04
    • Release 7.22.05
    • Release 7.22.06
    • Release 7.22.07
    • Release 7.22.08
    • Release 7.22.09
    • Release 7.22.10
    • Release 7.22.12
    • Release 7.23.01
    • Release 7.23.02
    • Release 7.23.03
    • Release 7.23.04
    • Release 7.23.05
    • Release 7.23.07
    • Release 7.23.08
    • Release 7.23.09
    • Release 7.23.10
    • Release 7.23.11
    • Release 7.23.12
    • Release 7.24.02
    • Release 7.24.03
    • Release 7.24.04
    • Release 7.24.05
    • Release 7.24.06
    • Release 7.24.07
    • Release 7.24.08
    • Release 7.24.09
    • Release 7.24.10
    • Release 7.24.11
    • Release 7.24.12
    • Release 7.25.01
    • Release 7.25.02
    • Release 7.25.03
    • Release 7.25.04
    • Release 7.25.05
  • Guides
    • Installation Guide
      • Scheduled Task installation
    • Upgrade Guide
    • LDAP Import
    • Training
      • Exercise : Create a new form
      • Exercise : Create a new Datastore Parameter
      • Exercise : Create a new Process
      • Exercise : Create a new Role
    • SubTopics in Topics
  • Pergapedia platform
Powered by GitBook
On this page
  • Best Practise with versions
  • Dual filtering
  • Filtering when the source are the Documents
  • Filter options
  • Function (Javascript) Filter examples

Was this helpful?

  1. Catalog
  2. Catalog Maintenance
  3. Parts (Fields)

Field Filtering

You can filter selection fields. In the underlying datastore, you can use any field to filter against.

As an example, build a datastore called 'Filtering Examples', and a vield 'Value' and a second field called 'Filter'. We will share some examples as how to filter.

Add some cities as values, and their country in the Filter field:

  • Bruges - Belgium

  • Brussels - Belgium

  • Ghent - Belgium

  • Amsterdam - The Netherlands

  • Rotterdam - The Netherlands

  • Frankfurt - Germany

  • Dresden - Germany

When entering a filter, select as type 'Plain text'. NCALC and Javascript will only be used in exceptional cases, you can already do a lot with the plain text filters.

To only show the cities from Belgium, use this filter:

[{ "fieldname": 'Filter', "filtervalue": 'Belgium' }]

To show the cities form both Germany & Belgium, use this filter:

[{ "fieldname": 'Filter', "filtervalue": 'Belgium' },{"connector": 'or', "fieldname": 'Filter', "filtervalue": 'Germany' }]

Create a text field, called 'Country'. If you want to filter against that text field:

[{ "fieldname": 'Filter', "filtervalue": #REPLACE-PARTVALUE-Country||# }]

Final note: Filters are applied to existing services, so a task runs every 5 minutes to apply any changes. You can kickstart this task by opening this link:

Best Practise with versions

When a template is exported from one installation and then imported in another, you might want to use different values in a select field. To avoid making a new datastore parameter to support this, you can also use filtering. This is how to set it up, do this from the start, to avoid issues when migrating:

  1. Any datastore parameter that is used in a selection field, please add a field 'filter_version'

  2. Enter '001' as version for all entries

  3. When this datastore parameter is used, set up this 'Plain text' Filter:

    1. [{ "fieldname": 'filter_versie', "filteroperator": 'contains', "filtervalue": '001' }]

Now, when you want to change the list of values, but not impact the current & old requests, follow these steps:

  1. Add '002' in the field 'filter_version'. Do not delete '001' anywhere, as this will affect the older requests.

  2. Open the field in the template-editor, and change the Filter to:

    1. [{ "fieldname": 'filter_versie', "filteroperator": 'contains', "filtervalue": '002' }]

With this solution, you can freely choose which fields need a new set of values.

It is important to do this from setup, because adding it in later requires database-handling from our support team.

Dual filtering

If you want to perform 2 filters at the same time (for example, both a Version filter & a field-specific filter), follow this example:

[{ "fieldname": 'Version', "filtervalue": 'v001' },{"connector": 'and', "fieldname": 'Filter', "filtervalue": 'Q_Exams' }]

In the example above, the list of entries in the datatore parameter is fitlered against 2 rules:

  1. Version = v001

  2. Filter = Q_Exams

Filtering when the source are the Documents

Filter options

When creating a selection field, for example checkboxes, you have 3 options when settings the Documents filter. These are:

  • No filter: all documents are shown

  • On part: this option allows the filter against 1 (and only 1) document part. For example, where the Category = Test

  • Function: this new feature allows to make a filter against multiple data-elements. The filter is built using Javascript, some example can be found below.

Function (Javascript) Filter examples

Filter against 2 Document parts

In the example below, we only want to show the documents, that are valid under these 2 conditions:

  1. Category 'equals' C1

  2. Docs_Status 'is different from' Archived

So the internal labels of the document parts are : Category & Docs_Status.

This is the Javascript to be used:

var categorypartvalue = document.parts.filter(function (p) { return p.internalname === "Doc_Category"; }).map(function (p) { return p.value; }).join(""); var statuspartvalue = document.parts.filter(function (p) { return p.internalname === "Docs_Status"; }).map(function (p) { return p.value; }).join(""); return categorypartvalue === "C1" && statuspartvalue !== "Archived";

Note: ID a user selected a document in the past, and the user then changes this document's status to 'Archived', the changed document will no longer be shown in the list. This is as expected via the filters. But, the document that was selected in the past is still selected in the DB, but no longer shown.

Filter against current date

The example below checks in filter 1 if the field 'Status' holds 'Beschikbaar' and the field that holds a date in yyyyMMdd, lies after the current date:

return [ { "fieldname": "Status", "filtervalue": "Beschikbaar" }, { "fieldname": "Datum yyyyMMdd", "filteroperator": "greatherthanorequal", "filtervalue": CommonInterface.utcDateToString(new Date(),"yyyyMMdd") } ];

PreviousField Visibility ExamplesNextDefault value

Last updated 5 months ago

Was this helpful?

https://yourlink/servicecatalog/test.aspx?fielddependencies=1yourlink