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

FLATTEN

Description

Returns an expanded range of data based on the hierarchical data that you specify. Typically you use this function to expand an organization's manager and employee information so that it displays all levels of the hierarchy.

Syntax

FLATTEN(
source
,
primary_column
,
detail_column
,
data_columns
, [
root_values
])
  • source
    : The range of data to flatten.
  • primary_column
    : The index value in the source for the higher-level item that you want to flatten by.
  • detail_column
    : The index value in the source for the lower-level item that you want to flatten by.
  • data_columns
    : The column indexes to select into the output.
  • root_values
    : Values that identify the topmost items in the hierarchy. The default is null (indicating the highest point in the hierarchy).