eval command
The eval
command can be used with either table data or event data.If used with event data the new field that is created won't be shown, because the event tab only shows the event data as a whole. Duh.
To show the new field that you have created then you will have to use the table
command to include that new field.
Important note
If you use eval
command with field names that include non-alphanumeric characters, other than '_', you must surround the field with single quotation marks. For example, if you are using 'server-1' field in your eval
expression then you must do it like so
eval new=count+'server-1'
Inline eval
If you use inline eval
with commands such as stats / chart
then you can evaluate new fields using the existing ones, you just need to use the AS
to assign it to a new column. As opposite from doing variable=<expression>
No Comments