Constants are values (either static or user input) that get passed into the SQL action section. Each constant in the input is entered using XML and contains three main parts.



<constant id = string
          name = string
          type = string
          required = bool>           
          <!-- children – >


Name Description Data Type Required
id defines how the field or constant is referenced in the script's SQL action section. string yes
name defines how the field or constant appears to the user when the Relativity script runs. string yes
type determines what sorts of input field(s) render on the script run screen. The available types are:
  • date
  • datetime
  • text
  • user
  • number
    • precision - the digit count of a number
    • scale - the digit count of the numbers to the right of a decimal
  • timezone

    Note: The input is rendered as a dropdown for selecting the time zone offset. The value is a decimal. For example, for Central Standard Time the value is -6.

string yes
required the acceptable values for this attribute are true and false. If not set, the script interprets it as true. If the input is marked as required, its input section field is rendered as required. Boolean no


Name Description
option limits the available inputs of the constant to the list of options specified. Its entry in the input section is rendered as a drop-down list.
value defines the display value (label) for the option if it is different from the actual value.


    <name>Query Artifact ID</name> 
    <description>Queries for an Artifact ID</description> 
    <input orientation="horizontal"> 
        <constant id="TextIdentifier" name="TextIdentifier" type="text" required="true" /> 
        <constant id="VersionListNoLabel" name="Version List without Label" type="text"> 
    <display type="itemlist" /> 
    <action returns="table"><![CDATA[ 
        SELECT TOP (1) [ArtifactID] 
        FROM [Artifact] 
        where TextIdentifier = '#TextIdentifier#'