This object is used in the response to the /fields request to provide information about a certain field from the dataset.
{
uniqueName: string,
type: string,
caption: string,
hierarchy: string,
parent: string,
folder: string,
interval: string,
aggregations: string[],
filters: boolean | FilterConfigObject
}
Property/Type | Description |
---|---|
uniqueName String | The field's unique name. The component will later use this value in the /members and /select requests. |
type String | The field's type. It can be "string" , "number" , or "date" . |
String | optional The field's caption to appear on the UI. |
hierarchy String | optional The hierarchy’s name. Used to configure multilevel hierarchies. Specify this property to set the field as a level of a hierarchy. See how to configure multilevel hierarchies. |
parent String | optional The parent level's unique name. This property is necessary to specify if the field is a level of a hierarchy and has a parent level. See how to configure multilevel hierarchies. |
folder String | optional The field's folder. Folders are used to organize groups of fields in the Field List. folder supports nesting via / (e.g., "Folder/Subfolder" ). |
interval String | optional A date's aggregation interval to group dates on the server. The component will later use this value in the /members and /select requests. Possible values depend on how the server handles date intervals. Only for fields of the "date" type. |
aggregations String[] | optional Aggregation functions supported on the server for the field. The server may support the following aggregations: "sum" , "count" , "distinctcount" , "average" , "median" , "product" , "min" , "max" , "stdevp" , "stdevs" , "none" , or a custom aggregation.Note: for fields of the "number" type, Flexmonster Pivot provides built-in front-end aggregations.To define supported aggregations for all fields or for fields of a certain type, use the root aggregations property of the response to the /fields request. Note that aggregations set for individual fields override aggregations set in the root aggregations property. Learn more about supporting aggregation functions. |
filters Boolean | FilterConfigObject | optional Filters supported on the server for the field. If the server supports all filters available in Flexmonster Pivot, set filters to true . To support only some filters, specify filters as a FilterConfigObject.To define supported filters for all fields or for fields of a certain type, use the root filters property of the response to the /fields request. Note that filters set for individual fields override filters set in the root filters property. Learn more about implementing filters. |
Here is an example of a response to the /fields request with the FieldInfoObject:
{ "fields":[ { "uniqueName": "Category", "type": "string", "hierarchy": "Item" }, { "uniqueName": "Color", "type": "string", "hierarchy": "Item", "parent": "Category" }, { "uniqueName": "Country", "type": "string", "filters": true }, // ... ], // ... }