lower
Converts all input strings to lowercase.
If your project has the Automatic sentence capitalization tool enabled, the first word of each sentence is capitalized in the output text, even if the word is part of a call to this function. You can disable the tool.
Parameters
X (string, list, column, or row)
The input value. This can be a string, a list, or a one-dimensional table region such as a column or row.
Examples
The function can take a string.
ATL in Script | Result |
---|---|
| all work and no play makes jack a dull boy |
It can also take a list, column, or row of strings.
ATL in Script | Result |
---|---|
[[ beatles = ('John', 'Paul', 'George', 'Ringo') lower(beatles) ]] | john, paul, george and ringo |
Converting all column values to lowercase can help with filtering.
Assume a "Describe the Table" project with this data:
ID | Region | Branch | Sales | |
---|---|---|---|---|
Row 1 | 1001 | Southeast | Atlanta | 357589.32 |
Row 2 | 1002 | Northeast | Boston | 294293.49 |
Row 3 | 1003 | midwest | Chicago | 403603.17 |
Row 4 | 1006 | Midwest | Indianapolis | 457359.45 |
Row 5 | 1007 | Midwest | Milwaukee | 192238.52 |
Row 6 | 1008 | Northeast | New York | 468745.37 |
The filterRows function is case-sensitive, so [[filterRows(WholeTable, 'Region', eq('Midwest'))]]
returns:
ID | Region | Branch | Sales | |
---|---|---|---|---|
Row 4 | 1006 | Midwest | Indianapolis | 457359.45 |
Row 5 | 1007 | Midwest | Milwaukee | 192238.52 |
To cover all casing variations, convert the Region values to lowercase and use 'midwest' as the constant.
[[filterRows(WholeTable, 'Region', value -> lower(value) == 'midwest')]]
The filtered table is:
ID | Region | Branch | Sales | |
---|---|---|---|---|
Row 3 | 1003 | midwest | Chicago | 403603.17 |
Row 4 | 1006 | Midwest | Indianapolis | 457359.45 |
Row 5 | 1007 | Midwest | Milwaukee | 192238.52 |