This tag, if used, populates a drop-down menu with the return value of an inline SQL statement.



<sql id = string
     name = string> 


Name Description Data Type Required
id defines how the field is referenced in the SQL action section of the script. string yes
name defines how the field appears to the user when the Relativity script runs. 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


The inputs are the same ID and name tags consistent with other input types. The contents of the SQL tag should be an SQL statement that returns at least two columns; one has to be named Display and the other has to be named ID.

When this input appears on the run page, a drop-down list type of field is created. The drop-down menu display value is whatever resides in the Display column and the behind-the-scenes value is whatever is populated in the ID column.


     <name> Example</name>
     <description> </description>
     <category> </category>
          <sql id="viewID" name="Views">
               Display = [Name],
               ID = [ArtifactID]
     <display type="report">
          <settings reporttitle="Test Title" />
     <action returns="table">
               SELECT * FROM [View]
               WHERE ArtifactID = #viewID# 

If the SQL input returns a string value, it must be enclosed in quotes when passed to the CDATA action, as in the following example.

declare @field_value varchar(100) = '#field_value#'
if (@field_value = 'Yes') ..