Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Whitebeam Template Reference Documentation

rb.file.fileSearchType

Search criteria for files.

Elements

The rb.file.fileSearchType struct has 17 elements:

Name Type/Value Range/Length Description
fileIDnumberValid fileID Optional. Identifier of an existing file. Defaults to all files if not supplied.
fragmentIDnumber0.. Optional. Index (zero based) of a specific fragment to return. This is only used if fileID is also specified. This isn't particularly useful as applications are most likely to use firstIndex to iterate of fragments in a file because the application doesn't often know the next fragment ID.

Available from version : 1.3.12

allDatanumber  Optional, default = 0

Specify which file data to return. Bit 0 is used to decide which subset of data is to be returned. For compatibility, if biot0==0 then the whole record is returned including the binary data. If bit0==1 then the binary data is *not* returned.

The rest of the attribute is a bitmask:

  • Bit (1) the search is to return fragments as well as the default
  • Bit (2) the search is to also return customData
  • Bit (3) return an array of contact IDs to which this file is linked - 1.3.27 onwards
keywordarray of strings4 keywords max. Optional. Minimum keywords does not perform a text search. Excess search keywords are ignored.
typestring  Optional.

Only return items that have this (wildcard) value in their type field.

For example setting this field to 'invoice%' will only return items that that have a type value that starts with the word 'invoice'. Note that comparisons are case-insensitive

Note you cannot search for items that have no type or that have a zero length string value - they will always be excluded from a search that specifies a type value.

Available from version : 1.3.14

searchInNamebool0 = FALSE, 1 = TRUE Optional, default = 0
Flag to request keyword(s) search of name.
searchInOwnerbool0 = FALSE, 1 = TRUE Optional, default = 0
Flag to request keyword(s) search of owner.
searchInDescriptionbool0 = FALSE, 1 = TRUE Optional, default = 0
Flag to request keyword(s) search of description.
searchInMimebool0 = FALSE, 1 = TRUE Optional, default = 0
Flag to request keyword(s) search of mime.
searchInLocationbool0 = FALSE, 1 = TRUE Optional, default = 0
Flag to request keyword(s) search of location.
sortByOwnerbool0 = FALSE, 1 = TRUE Optional, default = 0
Flag requesting the search response to be sorted by owner. Ignored for count.
sortBystring"fileID" | "name" | "owner" | "type" | "modifiedTime" Optional.

If this optional field is specified then it overrides the now deprecated "sortByOwner" field. The default is "fileID"

Each of these order specifiers may optionally have a '^' preceeding them. If this character is present then the order of the search is reversed. So for example "^name" sorts by the name field in reverse alphabetic order.

Available from version : 1.3.14

firstIndexnumber0.. Optional, default = 0
Index (zero based) of the first file matching the search criteria to be returned by iterator. Ignored for count.
isInContactarray of numbers  Optional. List of contact IDs to which files must be attached in order to satisgy this search. A file must be attached to at least *one* of the contact IDs in the list in order to be returned to the caller.

Available from version : 1.3.12

isInContactAllLevelsbool  Optional, default = 0

If this field is present and set to true then each ID in the isInContact array will be replaced with it's contents:

  • INDIVIDUAL: unchanged
  • OU: replaced with self plus all desendent OUs and all INDIVIDUALS attached to any of the OUs
  • COMMUNITY: replaced with all OU and INDIVIDUALS that are contained within this community

Note this means that the expanded list will contain no community IDs.

Available from version : 1.3.14

isInItemarray of numbers  Optional. List of catalogue item IDs to which file must be attached (or must not be attached) in order to satisgy this search. A file must be attached to at least *one* of the +ve item IDs in the list and must not be attached to any of the abs(-ve) item IDs.

Available from version : 1.3.12

maxRowsnumber  Optional, default = -1

This is a 'hint' to indicate the number of rows that the application expects to use. This can improve performance if for example a result set can include thousands of rows, but the application will only display the first 20.

In the case of the File template this is also useful for the case where you know you're only going to fit at most ONE record into the database response (because you're loading big files) and want to stop the iterator having to read multiple rows only to fail. This is particularly useful where you're iterating over fragments of the same file. In this case it is strongly suggested that you set maxRows to 1.

Available from version : 1.3.14


Whitebeam release 1.3.36
(loadtime : 60ms)