mvappend()

Table of Contents

Definition

mvappend() takes one or more values as arguments and returns a single multivalue result containing all of the values. The values can be given as strings or column references.

Syntax
...| eval n=mvappend(<value1>, <value2>, <value3>, ...)

Examples

The following example adds a new pet name to the existing value and turns it into multivalue column.

| makeresults
| eval name="Alice"
| eval employees=mvappend("Bob", name)
Screenshot of the previous example’s result

You can also use mvappend() to create a multivalue column from a scratch. The following example creates a list of different fruits.

| makeresults
| eval fruits=mvappend("banana", "apple", "pear", fruits)
Screenshot of the previous example’s result

Further Reading