Skip to main content
Workday User Guide
Last Updated: 2023-06-23
PACK_VALUES

PACK_VALUES

Description

PACK_VALUES
is a row function that returns multiple output values packed into a single string of key/value pairs separated by the default key and pair separators. The string returned is in a format that can be read by the
EXTRACT_VALUE
function.
PACK_VALUES
uses the same key and pair separator values that
EXTRACT_VALUE
uses (the Unicode escape sequences
u0003
and
u0002
, respectively).

Syntax

PACK_VALUES
(
key
,
value
[,
key
,
value
][,...])

Return Value

Returns one value per row of type
TEXT
. If the value for either
key
or
value
of a pair is null or contains either of the separator values, the full key/value pair is omitted from the return value.
The key separator is
u0003
, which is the Unicode escape sequence for the
start of text
character. The pair separator is
u0002
, which is the Unicode escape sequence for the
end of text
character.

Input Parameters

key
At least one required. A field name of any type, a literal string or number, or an expression that returns any value.
value
At least one required. A field name of any type, a literal string or number, or an expression that returns any value. The expression must include one
value
instance for each
key
instance.

Examples

Combine the values of the [custid] and [age] fields into a single text field.
PACK_VALUES("ID", [custid], "Age", [age])
This expression returns
ID
\u0003
5555
\u0002
Age
\u0003
29
when the value of the [custid] field is 5555 and the value of the [age] field is 29:
PACK_VALUES("ID", [custid], "Age", [age])
This expression returns
Age
\u0003
29
when the value of the [age] field is 29:
PACK_VALUES("ID", NULL, "Age", [age])
This expression returns
29
as a
Text
value when the [age] field is an
INTEGER
and its value is 29:
EXTRACT_VALUE(PACK_VALUES("ID", [custid], "Age", [age]), "Age")