Defining the values for XML attributes for a search attribute

You can review the information about defining values for XML attributes for a search attribute.

The following table contains information about defining the values of the XML attributes for a search attribute:

Component

Component Type

Component Location

Description

Name

Attribute

Attributes/Attribute

Indicates the XML name of the search attribute. This component, along with the XPath, is used to set the source and target binding for the control that is displayed in the UI.

DataType

Attribute

Attributes/Attribute

Indicates the data type of the search attribute. If data Type is not provided, it is derived using the XPath and the Name attribute values. You can use the DataType attribute to override the default data types. Each data type is mapped to String, Date, or Number. If query types are not explicitly mentioned, this mapping is used to display the query types in the UI.

DisplayName

Attribute

Attributes/Attribute

Indicates the bundle key of a label that is displayed in a drop-down list for search attributes. If the label is not mentioned, the Name attribute is considered as the bundle key to display the label. This bundle entry should be defined in the server-side bundle file.

XPath

Attribute

Attributes/Attribute

Indicates the XML path of the element to which the search attribute belongs.

DefaultQueryTypes

Attribute

Attributes/Attribute

Indicates the default query type for the search attribute. If DefaultQueryTypeDesc is not set for an attribute, set it by performing this procedure:

Get the supported query types by either reading the overridden query types or using the out-of-the-box query types for the data type of the attribute. Because Equal is the most commonly used query type, verify if it is one of the supported query types. If yes, use Equal as the default. Otherwise, use the first query type, which is displayed in the list of supported query types.

StringQueryTypes

Element

Attributes/Attribute

Indicates that out-of-the-box string query types are being overridden with the child elements of the StringQueryTypes element. If all the possible StringQueryTypes are not required, create one QueryType child element of StringQueryType for each query type you want to support.

DateQueryTypes

Element

Attributes/Attribute

Indicates that out-of-the-box date query types are being overridden with the child elements of the DateQueryTypes element. If all the possible date query types are not required, create one QueryType child element of DateQueryType for each query type you want to support.

NumericQueryTypes

Element

Attributes/Attribute

Indicates that out-of-the-box numeric query types are being overridden with the child elements of the NumericQueryTypes element. If all the possible NumericQueryTypes are not required, create one QueryType child element of NumericQueryType for each query type you want to support.

QueryType

Element

Attributes/Attribute/
StringQueryTypes

OR

Attributes/Attribute/
DateQueryTypes

OR

Attributes/Attribute/
NumericQueryTypes

Indicates the query types that are supported for the search attribute. See the Query Types Supported for Search Attribute section for detailed information on the supported parameters.

QueryType

Attribute

Attributes/Attribute/
StringQueryTypes/QueryType

OR

Attributes/Attribute/
DateQueryTypes/QueryType

OR

Attributes/Attribute/
NumericQueryTypes/QueryType

Indicates the query type. For more information about the supported query types, see the description of the QueryType Element.

QueryTypeDesc

Attribute

Attributes/Attribute/
StringQueryTypes/QueryType

OR

Attributes/Attribute/
DateQueryTypes/QueryType

OR

Attributes/Attribute/
NumericQueryTypes/QueryType

Indicates the bundle key of the label that is displayed for the query type in the UI. If the value of QueryTypeDesc is not set, the QueryTypeDesc attribute value corresponding to the query type is considered as the bundle key that will display the query type label. This bundle entry should be defined in the server-side bundle file. For more information about the supported query types, see the description of the QueryType Element.

Configuration

Element

Attributes/Attribute

Indicates that the search attribute will have certain configuration for UI control and possible values of the search attribute.

ActionURL

Attribute

Attributes/Attribute/Configuration

Indicates the action that returns the list of possible values for the search attribute. This action may either return the static list of predefined values or call the corresponding API to get them, and then return them. For example, the ActionURL can return the values pertaining to the common codes, currency, and countries or regions.

UIControlConfiguration

Element

Attributes/Attribute/Configuration

Indicates that the search attribute will have certain configurations for UI control.

xtype

Attribute

Attributes/Attribute/
Configuration/UIControlConfiguration

Indicates the type of the control that is displayed in the Advanced Search screen for the search attribute. See the Possible xtypes for an Attribute section for the list of xtypes and descriptions.

optionsBinding

Attribute

Attributes/Attribute/
Configuration/UIControlConfiguration

The optionsBinding attribute is used to specify the repeating elements of the list that constitutes one value of either combination box values or radio button values.

Note: This is applicable only for a combination box and a radio button.

displayField

Attribute

Attributes/Attribute/
Configuration/UIControlConfiguration

The displayField attribute specifies the attribute whose value is used as the label.

Note: This is applicable only for a combination box and a radio button.

valueField

Attribute

Attributes/Attribute/
Configuration/UIControlConfiguration

The valueField attribute is used to uniquely identify the repeating element in order to display the correct value of the selected option from either a combination box or a radio button.

Query types supported for search attribute

The following table contains the types of queries supported for the search attribute, which is described in the Add or Modify a Search Attribute topic.

Query Type Supported for:

QueryType

QueryTypeDesc

Description

strings

EQ

is

is

strings

FLIKE

starts_with

starts with

strings

LIKE

contains

contains

numbers

EQ

is

is

numbers

GE

greater_than_or_equal_to

greater than or equal to

numbers

LE

less_than_or_equal_to

less than or equal to

numbers

NE

not_equal_to

not equal to

numbers

LT

less_than

less than

numbers

GT

greater_than

greater than

dates

EQ

is

is

dates

GE

greater_than_or_equal_to

greater than or equal to

dates

LE

less_than_or_equal_to

less than or equal to

dates

NE

not_equal_to

not equal to

dates

LT

less_than

less than

dates

GT

greater_than

greater than

dates

BETWEEN

between_from_and_to

between

Possible xtypes for an attribute

An xtype attribute indicates the type of the control that is displayed in the Advanced Search screen for the search attribute. The following table contains the possible xtypes supported for a search attribute, which is described in the table in the Add or Modify a Search Attribute topic.

xtype

Description

xadvancedtextcontrol

Used to display a text box in the UI.

xadvancedradiocontrol

Used to display radio buttons in the UI.

xadvanceddatecontrol

Used to display a field for entering date in the UI.

xadvancedcomboboxcontrol

Used to display a drop-down list in the UI.

xadvancedtriggercontrol

Used to display a trigger field in the UI.

xadvattributelookup

Used to display an attribute lookup widget in the UI.

xadvancednumbercontrol

Used to display a number field in the UI.