Skip to content

Views Searchable Types

Supported <Searchable> types are:

  • StringContains
  • RangeOfDates
  • RangeOfMillis
  • StringEquals
  • IStringEquals
  • OrgPath
  • Flags
  • Padding
  • InList

Types automatically take user allow permissions into account when executing a search. The permission set format is as follows:

transactions=allow("ViewName"('Searchable.Name'='Value'))

By repeating the same Searchable.Name with different values in the permission set syntax you are supplying a list of possible values:

transactions=allow("ViewName"('Searchable.Name1'='Value1', 'Searchable.Name1'='Value2', 'Searchable.Name1'='Value3'))

Warning

Not all searchable types support multiple values derived from a users permission sets

The following <Searchable> types support multiple values obtained from user permissions:

  • StringContains
  • StringEquals
  • IStringEquals

These types construct a search term for each repeating value obtained from the users permissions.

When multiple terms exist the logical OR operator is applied to the repeated terms in the search

Note

The logical AND operator can be added to a transaction search by adding additional <Searchable> elements with the same <Xpath>

User Email Auto Expansion

Permission sets can specify the following as a value:

  • %USER.EMAIL%

This value will be replaced by the current users email address as the search term is evaluated

StringContains

Evaluates XPATH CONTAINS. If multiple <XPath>s are provided then the generated search terms are delimited by the logical OR operator.

  • (xpath CONTAINS ‘abc’ OR xpath CONTAINS ‘abc’)

When repeating permission set allow terms are added you can end up with:

  • (xpath CONTAINS ‘abc’ OR xpath CONTAINS ‘abc’) OR (xpath CONTAINS ‘def’ OR xpath CONTAINS ‘def’) OR (xpath CONTAINS ‘ghi’ OR xpath CONTAINS ‘ghi’)

assuming a user has permissions:transactions=allow("ViewName"('Searchable.Name1'='def', 'Searchable.Name1'='ghi'))

RangeOfDates

Values pairs are supplied in the search criteria using the names:

  • Searchable.Name_from
  • Searchable.Name_to

The format of the supplied values is specified as path of the type declaration:

<Type>RangeOfDates(yyyy'-'MM'-'dd' 'HH:mm:ss.S z)</Type>

If the given date value cannot be parsed or the given format is invalid, a default format may be used. This default can be specified in a .conf file using key: service.views.default.date.format

Values can be specified using a user allow permissions however only the first value of a repeating value sequence will be used.

RangeOfMillis

Values pairs are supplied in the search criteria using the names:

  • Searchable.Name_from
  • Searchable.Name_to

The format of the supplied values is specified as the number of millis since the epoch.

Values can be specified using a user allow permissions however only the first value of a repeating value sequence will be used.

StringEquals

Evaluates XPATH EQUALS. Multiple <Xpath> elements are not supported.

Values can be specified using a user allow permissions, repeating value sequence delimited with the OR operator

IStringEquals

Evaluates XPATH IEQUALS. Multiple <Xpath> elements are not supported.

Values can be specified using a user allow permissions, repeating value sequence delimited with the OR operator

OrgPath

Warning

Only a single <Searchable> of type <OrgPath> is allowed per view

The evaluation of this type originates entirely from a users allow permission sets. The following syntax is expected:

transactions=allow("ViewName"(BRANCH | USER | UNIT))

The searching users associated position(s) in the instance organisational tree are evaluated as the search terms are built using either BRANCH, UNIT or USER tree hierarchy rules. The one or more organizational tree paths form part of a single comma separated value that is used to form the expression:

XPATH ARRAY_OVERLAP (have elements in common) with comma separated org value(s)

Values can be specified using a user allow permissions however only the first value of a repeating value sequence will be used.

Organizational Tree Hierarchy Terms:

  • USER: A list of all tree nodes the user is directly assigned to
  • UNIT: As USER plus the paths of all other trees nodes with the same parent as the nodes to which the user is directly assigned.
  • BRANCH: As USER plus the paths of all child decedent nodes to nodes which the user is directly assigned

Flags

The search criteria single value is a JSON string containing flag names and boolean match values (true|false) The JSON is parsed and an expression is created as follows:

XPATH CONTAINS ( Flag.Name1 & Flag.Name2 & !Flag.Name3 )

Values can be specified using a user allow permissions however only the first value of a repeating value sequence will be used.

Padding

Has no effect on search term generation. Only used as a spacing mechanism on the user interface.

InList

Evaluates XPATH[.=value] EXISTS. Multiple <Xpath> elements are not supported.

Values can be specified using a user allow permissions however only the first value of a repeating value sequence will be used.