Decodes an integer to its bit-representation and extracts the bits at specified indices to specified field names as a boolean.
The bits are indexed from 0 and can accept up to 64 bits (the length of a Long). If the value in the input field is larger, the lowest 64 bits will be used.
Parameter | Type | Required | Default Value | Description |
---|---|---|---|---|
field | string | required | The name of the field that should be decoded. | |
onlyTrue | boolean | optional[a] | false | If set to true , fields will only be added if their value in the bitfield is true ; any flags that are false will not be added. |
output | array of arrays of strings | required | A list of pairs of indices in the bit-representation and the field name it should be written to. | |
[a] Optional parameters use their default value unless explicitly set. |
bitfield:extractFlags()
Examples
Click
next to an example below to get the full details.Decode and Extract Bit Flags
Extract true
bits using the bitfield:extractFlags()
function
Generate Temporary Event With Bit Flags For Troubleshooting
Generate temporary events with the createEvents()
function as part of the query to generate sample data for testing or troubleshooting