client/splunk.js
function(fieldName) {
            if (!this.dataModelObject.hasField(fieldName)) {
                throw new Error("Did not find field " + fieldName);
            }
            var f = this.dataModelObject.fieldByName(fieldName);
            if (!utils.contains(["number", "string"], f.type)) {
                throw new Error("Field was of type " + f.type + ", expected number or string.");
            }

            var col = {
                fieldName: fieldName,
                owner: f.owner,
                type: f.type
            };

            if ("number" === f.type) {
                col.display = "all";
            }

            this.columns.push(col);

            return this;
        }
function(fieldName) {
            if (!this.dataModelObject.hasField(fieldName)) {
                throw new Error("Did not find field " + fieldName);
            }
            var f = this.dataModelObject.fieldByName(fieldName);
            if (!utils.contains(["number", "string"], f.type)) {
                throw new Error("Field was of type " + f.type + ", expected number or string.");
            }

            var col = {
                fieldName: fieldName,
                owner: f.owner,
                type: f.type
            };

            if ("number" === f.type) {
                col.display = "all";
            }

            this.columns.push(col);

            return this;
        }
function ( fieldName ) { if ( ! this . dataModelObject . hasField ( fieldName ) ) { throw new Error ( "Did not find field " + fieldName ) ; } var f = this . dataModelObject . fieldByName ( fieldName ) ; if ( ! utils . contains ( [ "number" , "string" ] , f . type ) ) { throw new Error ( "Field was of type " + f . type + ", expected number or string." ) ; } var col = { fieldName : fieldName , owner : f . owner , type : f . type } ; if ( "number" === f . type ) { col . display = "all" ; } this . columns . push ( col ) ; return this ; }
Add a column split on a string or number valued field, producing a column for
each distinct value of the field.

@param {String} fieldName The name of field to split on.
@return {splunkjs.Service.PivotSpecification} The updated pivot specification.

@method splunkjs.Service.PivotSpecification
Add a column split on a string or number valued field producing a column for each distinct value of the field .