forAllCellsByColumn
Loops through a column and applies a function to all cell values.
The output is a concatenated string.
The first parameter defines the input column, and the second defines a function to apply to each cell value. You can write this function as a lambda expression or give the name of a user-defined function.
Note
Available in "Describe the Table" and "Describe Row in Context" projects only.
Parameters
FOCUS COLUMN (column)
The input column.
FUNCTION (function)
The function to apply to all cell values in the column.
Write a lambda expression or the name of a user-defined function.
Example
Assume a "Describe the Table" project with this data:
ID | Branch | State | Sales | Profit | |
---|---|---|---|---|---|
Row 1 | 1 | Pittsburgh | Pennsylvania | 478,745.37 | 8,7856.34 |
Row 2 | 2 | Boston | Massachusetts | 329,494.49 | 10,451.41 |
Row 3 | 3 | Los Angeles | California | 467,359.45 | 12,059.78 |
Row 4 | 4 | Chicago | Illinois | 463,603.17 | 9,452.35 |
These examples use a lambda expression to apply the upper function to each cell value in a column.
ATL in Script | Result |
---|---|
| PITTSBURGHBOSTONLOS ANGELESCHICAGO |
| PENNSYLVANIAMASSACHUSETTSCALIFORNIAILLINOIS |
To get a list of amended column values, use the map function instead.
ATL in Script | Result |
---|---|
| PITTSBURGH, BOSTON, LOS ANGELES and CHICAGO |
| PENNSYLVANIA, MASSACHUSETTS, CALIFORNIA and ILLINOIS |
Note
In a "Describe Row in Context" project, the column variables are BranchColumn
and StateColumn
.