QQ - How do I dynamically create a banded field in script?
- 1 Minute to read
- Print
- DarkLight
- PDF
QQ - How do I dynamically create a banded field in script?
- 1 Minute to read
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Banded fields group numeric data into "bins" that have specified upper and lower limits. Various options are available for controlling banding through the Banded Field dialog.
To create the kind of banded field that will dynamically calculate bins depending on the source data, use the Engineering | Banded Fields | Auto option.
This will bring up the Auto Banded Field dialog:
The following is an example of a JSON method used to create an Auto-banded field:
{
"method": "BuildBakedField",
"project": "DemoPrep6",
"targetTable": "03_HEADER",
"p1": "phone_no",
"overwrite": true,
"name": "phone_no_banded",
"auto": true,
"bands": 10,
"named": true,
"function": "numberband",
"dataSet": {
"logic": "or",
"name": "state_AK",
"strict": true,
"set": [
{
"logic": "and",
"stype": "FIELD",
"entity": {
"type": "field",
"name": "03_HEADER.state",
"table": "03_HEADER",
"valueFilter": []
},
"op": "=",
"values": [
"AK"
]
}
]
}
}
Key | Value | Description |
---|---|---|
method | BuildBakedField | |
project | ||
targettable | table containing source field | |
p1 | field name | |
overwrite | true, false | if true, field will be recreated |
name | banded field name | |
dataSet | Filter of records to include in banding | |
function | numberband | |
bands | 1...128 | number of "bins" or bands to create |
named | true, false | if true, band names will be automatically calculated |
auto | true, false | If true, band intervals will be automatically calculated to fit the specified number of bands |
Was this article helpful?