STATE

To configure a state field, set the field type to STATE:

Filter

For the filter field, you can specify either a single-select or multi-select field. Here are examples of each:

Single-select

Provide the following in the WHERE clause of the SQL:

${filterIfNotNull:STATE,state = $STATE$}


The filter field definition is as follows:

<CustomFilterField>
<FieldRef category="PDF" levelType="ZBKS.Book">
<FieldName>State</FieldName>
</FieldRef>
<Type>STATE</Type>
<SimpleMapping sqlName="STATE"/>
<CustomModelName>Standard ZBKS.Book</CustomModelName>
</CustomFilterField>

Multi-select

Provide the following in the WHERE clause of the SQL. Note the difference from the clause used for the single-select variation:

${filterIfNotNull:STATE,state IN $STATE$}


The filter field definition is the same as single-select, except there's an extra attribute uiFieldRenderMode which tells the UI to display it as a checkbox group:

<CustomFilterField uiFieldRenderMode="ColumnarCheckboxesNoButtons">
<FieldRef category="PDF" levelType="ZBKS.Book">
<FieldName>State</FieldName>
</FieldRef>
<Type>STATE</Type>
<SimpleMapping sqlName="STATE"/>
<CustomModelName>Standard ZBKS.Book</CustomModelName>
</CustomFilterField>

Following are the key points to note:


  • Type is set as STATE (Note the capital letters)

  • CustomModelName is used to fetch the states defined on model