How to Configure Input Fields for an Aggregated Query

This section explains how to configure input fields for aggregated queries. These fields are displayed as filters options when executing an aggregated query. They must be registered in an InputFields set, where a Field node is used to register each input field (see figure below).

 

 

 

Each Field node must contain the following required elements:

    ID: Unique identifier for the field, to be used throughout the entire configuration. This attribute must be the only one in the scope of the set. When the aggregated query is executed, each input field will be sent in the request to the data source in the form of a variable with the same value as this ID. This behavior is adopted unless there are input mappings configured, as described in Appendix -> Configurations for Aggregated Queries -> Registering Aggregated Queries -> How to Configure Input Mappings for an Aggregated Query.

    DisplayName: Text to be displayed for the input field in the system when executing the aggregated query.

    Type: Type of the input field. Currently, the only type available is "Text".

 

The Field node must have the following XML structure:

<Field ID="field1" DisplayName="Field 1" Type="Text">

     ...validation configurations...

</Field>

 

Validations for each input field can also be configured. These can be used to indicate required fields or to prevent users from entering invalid content in the search fields (through regular expression masks). When the conditions specified in the validations are not met, an error message is displayed beneath the field (see figure below).

 

 

The table below lists the types of validations that can be created, along with a description of each.

Name

Description

Mask

Specifies a regular expression mask for the input field, defined through a specific format of literal values and mask definitions. Any character not defined in the list below will be considered a literal value:

a: Represents an alpha character (A-Z, a-z)

9: Represents a numeric character (0-9)

*: Represents an alphanumeric character (A-Z, a-z, 0-9)

 

Internally, the masked-input-plugin is also used. For details, see the documentation on the plugin at http://digitalbush.com/projects/masked-input-plugin/.

IsRequired

Indicates whether the field is required. Valid values: "True" or "False".

IsEmail

Indicates whether the value to be entered must be an e-mail address. Valid values: "True" or "False".

IsUrl

Indicates whether the value to be entered must be a URL. Valid values: "True" or "False".

IsCPF

Indicates whether the value to be entered is a CPF. Valid values: "True" or "False".

IsDateBr

Indicates whether the value to be entered is a data in mm/dd/yyyy format. Valid values: "True" or "False".

IsNumeric

Indicates whether the value to be entered must be a number, which can contain a comma, a period, and a minus sign in front. Valid values: "True" or "False".

IsDigitsOnly

Indicates whether the value to be entered must be composed of numeric digits. Valid values: "True" or "False".

Regex

Defines a customized regular expression mask to validate the value entered. The value must be a valid regular expression JavaScript.

MinLength

Indicates the minimum number of characters that must be entered. The value must be a whole number, indicating the quantity.

MaxLength

Indicates the maximum number of characters that can be entered. The value must be a whole number, indicating the quantity.

NumericMinValue

If the value to be entered is numeric, indicate the minimum valid value. The value must be a real number, indicating the minimum value.

NumericMaxValue

If the value to be entered is numeric, indicate the maximum valid value. The value must be a real number, indicating the maximum value.

 

When completed with validations, the Field node should have the following appearance:

<Field ID="ssn" DisplayName="SSN" Type="Text">

     <IsRequired>True</IsRequired>

     <IsSSN>True</True>

</Field>