PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Data Table package guide

Work with typed tables: create, inspect, clean, combine, change, and export rows and columns.

Version 2.13.2. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Prerequisites

The actions work in memory, with no spreadsheet application or session. To export, the account of the Run needs write access. result → x means: save the output in variable x. Fields not marked required are optional, and an empty field uses the default in the table. A column or row that does not exist, or a position out of range, fails the step.

Use a Table variable for a table input: text that looks like CSV is not a Table. Use a Record variable for a Record input. A List input takes a List variable or an array such as ["a","b"]. For an Any field, use a typed variable when the column type matters: a value typed in the field has type Any. To put a Number in text, write $number|string$.

A table input allows at most 100,000 rows, 1,000,000 cells and 16,777,216 characters. A result can be larger. In cleanup actions, "spaces" also means tabs and other whitespace.

Sample data:

  1. Save the CSV below as samples/orders.csv.
  2. Open it with CSV/TXT Open (session=orders, containsHeader=true, delimeter=comma).
  3. Read it with the same session into Table $orders$, then Close. All columns are String.
  4. For a Record input, loop over the rows of the table and save the first row as $person$ (id=A1, name=Ada, qty=2).

Each example starts from this table. Do not chain examples that remove data. Make the other tables in the examples the same way, with the headers and rows given.

id,name,qty
A1,Ada,2
A2,Bea,10

Shared fields

Actions link here for the fields they use.

IDFieldType; default; requirementUse
tableData table name (also Select Data Table⁠, Enter datatable name)Tabledefault empty TablerequiredYour table.
inputTableBase table (also Base Table⁠, Input Data Table⁠, Table⁠, Input Table variable)Tabledefault empty TablerequiredYour table.
columnNamecolumnNameStringdefault ""Column header, such as name⁠. Exact case first (see column selection).
columnIndexcolumnIndex (also Column index)Numberdefault 0Column position, starting at 0.
colNameColumn nameStringdefault ""Column header, such as name⁠. caseSensitive sets the case rule.
colIndexColumn indexNumberdefault 0Column position, starting at 0.
caseSensitiveCase-sensitive comparisonBooleandefault falsetrue⁠: exact case. false⁠: case is ignored. Spaces are never trimmed.
rowPositionRow by index (also Row index)Numberdefault 0Row position, starting at 0, such as 0 for the first row. The row must exist.

Column selection

Pick a column by NAME (its header, such as name) or by INDEX (its position, starting at 0). Only the field for your choice is used. A column that does not exist fails the step (Table has columns returns a Boolean instead). Exact case first: an exact match wins, else case is ignored. Extract table columns takes the first match with case ignored.

Typed values: only the value field of the selected columnType is used. Number: type 2.5 or use a Number variable. Datetime: type 2026-10-15T09:00:00Z or use a Datetime variable with the offset you want. Boolean: type true or use a Boolean variable.

Count comparison

The count of the table is compared with your number. The count includes every column or row, also empty ones.

IDFieldType; default; requirementUse
conditionComparisonComparisondefault EQOne code from the table below.
CodeEditor labelMeans
LTLess than (<)less than
LTQLess or equal to (≤)less than or equal
EQEquals to (=)equal
GTEGreater or equal to (≥)greater than or equal
GTGreater than (>)greater than
NEQNot equal to (≠)not equal

Export formats

Write to file and Write to file stream share these fields. CSV export puts quotes around delimiters, quotes and line breaks. It puts an apostrophe before text that starts with =, +, - or @ (after any spaces or tabs), so a formula does not run. This changes such values.

IDFieldType; default; requirementUse
rowDelimiterRow delimiterDelimiterdefault NEW_LINEA delimiter from the table below.
otherRowDelimiterDelimiterStringdefault ""Only with rowDelimiter=OTHER⁠: a separator that is not empty, such as ;⁠. It can have more than one character.
columnDelimiterColumn delimiterDelimiterdefault COMMAA delimiter from the table below.
otherColumnDelimiterDelimiterStringdefault ""Only with columnDelimiter=OTHER⁠: a separator that is not empty. It can have more than one character.
encodingEncodingEncodingdefault UTF_8_WITHOUT_BOMAn encoding from the table below.
DelimiterWrites
COMMA,
SEMI_COLON;
COLON:
TABa tab
NEW_LINEa line feed (LF)
OTHERthe text in the matching other-delimiter field
EncodingWrites
ansiWindows-1252
UTF_8_WITHOUT_BOMUTF-8 without a byte order mark
UTF_8UTF-8 with a byte order mark
UTF_16LEUTF-16 little-endian without a byte order mark
unicodeUTF-16 little-endian with a byte order mark
win1251Windows-1251
SHIFT_JIScode page 932

Date formats

Change column type reads dates in one of these forms when formatType=preBuilt. A zone name in brackets is removed, and its rules are not applied.

FormatExample or form
BASIC_ISO_DATE20261015
ISO_LOCAL_DATE2026-10-15
ISO_OFFSET_DATEdate with offset, such as 2026-10-15+02:00
ISO_DATEdate, offset optional
ISO_LOCAL_DATE_TIMElocal date and time, such as 2026-10-15T09:00:00
ISO_OFFSET_DATE_TIMEdate and time with offset, such as 2026-10-15T09:00:00+02:00
ISO_ZONED_DATE_TIMEdate and time with offset and an optional zone in brackets
ISO_DATE_TIMElocal date and time, or with offset
ISO_ORDINAL_DATE2026-288
ISO_WEEK_DATE2026-W42-4
ISO_INSTANTdate and time with offset
RFC_1123_DATE_TIMEThu, 15 Oct 2026 00:00:00 GMT

Table outputs

IDTypeEditor field
resultTableAssign modified table to⁠, Save the outcome to a variable⁠, Assign reversed table to or Assign sliced table to⁠, by action.
tableTableData table name⁠, or Enter datatable name in Sort.

Actions

Add column (dataTableAddColumn)

Add a column from one repeated value or from a List, such as a status per row.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
colNameColumn nameStringdefault ""New header, such as status⁠. Empty: Column and the new position, starting at 1. Duplicate headers are allowed.
insertTypeAdd columnInsertAtdefault ENDEND⁠: add at the end. INDEX⁠: insert at itemPosition⁠.
itemPositionEnter item position indexNumberdefault 0Only with insertType=INDEX⁠: position from 0 to the column count.
insertMethodColumn valueColumnValueSourcedefault DEFAULTDEFAULT⁠: repeat defaultValue⁠. LIST⁠: one item of columnValues per row. A longer list adds rows; a shorter list leaves the other new cells empty.
defaultValueDefault valueAnydefault empty StringOnly with insertMethod=DEFAULT⁠: a typed value, such as String $status$ that contains new⁠. Its type becomes the column type.
columnValuesColumn valuesListdefault []Only with insertMethod=LIST⁠: a List or JSON array, such as ["new","hold"]⁠. If all items have one type, the column has that type, else String.

Outputs

Uses table outputs: result.

Example

Set inputTable=$orders$, colName=status, insertType=END, insertMethod=LIST, columnValues=["new","hold"]. result → $tagged$.

Expected result

$tagged$ has headers id,name,qty,status and rows A1,Ada,2,new and A2,Bea,10,hold. An empty table with a List of values gets new rows.

Back to actions

Assign (dataTableAssign)

Copy a Table, or make an empty table of a fixed size.

Inputs

IDFieldType; default; requirementUse
optionSource data tableOptiondefault tabletable⁠: copy sourceTable⁠. resize⁠: an empty table of rowSize rows and columnSize columns.
sourceTablesourceTableTabledefault empty TableOnly with option=table⁠: the table to copy, such as $orders$⁠.
rowSizeNumber of rowsNumberdefault 1Only with option=resize⁠: number of rows, more than 0.
columnSizeNumber of columnsNumberdefault 1Only with option=resize⁠: number of columns, more than 0. Names: Column1⁠, Column2 and so on.

Outputs

Uses table outputs: result.

Example

Set option=resize, rowSize=2, columnSize=3. result → $grid$. To copy instead, set option=table, sourceTable=$orders$.

Expected result

$grid$ has String columns Column1, Column2, Column3 and two rows of empty text. A size of 0 or less fails. A copy keeps the columns and rows of the source.

Back to actions

Change column type (dataTableChangeColumnType)

Convert every cell of a column, and the column type, before you sort numbers or calculate with dates.

Inputs

Uses shared fields: table, columnName, columnIndex.

IDFieldType; default; requirementUse
changeOptionsSelect column byChangeOptionsdefault NAMENAME or INDEX⁠. See column selection.
changeTypeSelect the new column data typeChangeTypedefault StringString⁠: keep the text. Number⁠: numbers with a dot for decimals, such as 2.5⁠. Boolean⁠: true or false⁠. Datetime⁠: the date format you select. Empty cells stay empty.
formatTypeSelect date time formatFormatTypedefault preBuiltOnly with changeType=Datetime⁠: preBuilt uses preBuiltFormat⁠; custom uses customFormat⁠.
preBuiltFormatpreBuiltFormatPreBuiltFormatdefault ISO_LOCAL_DATEOnly with formatType=preBuilt⁠: one of the date formats.
customFormatcustomFormatStringdefault ""Only with formatType=custom⁠: a date pattern such as dd/MM/yyyy⁠, with English month and day names. A cell that does not match fails the conversion.

Outputs

Uses table outputs: result.

Example

Set table=$orders$, changeOptions=NAME, columnName=qty, changeType=Number. result → $numericOrders$.

Expected result

qty is a Number column with values 2 and 10. The other columns do not change. A cell such as two fails the conversion.

Back to actions

Clear content (dataTableClearContent)

Remove all rows and keep the columns.

Inputs

Uses shared fields: table.

Outputs

Uses table outputs: table.

Example

Set table=$orders$. Output table → $cleared$.

Expected result

$cleared$ has headers id,name,qty and no rows. An empty table keeps its columns.

Back to actions

Convert Column To List (dataTableConvertColumnToList)

Get the cells of one column as a List, for a loop over names or IDs.

Inputs

Uses shared fields: inputTable, colName, caseSensitive, colIndex.

IDFieldType; default; requirementUse
selectMethodSelect column bySelectBydefault NAMENAME or INDEX⁠. See column selection.

Outputs

IDTypeResultEditor field
resultListThe column values, in row order.Assign column values to

Example

Set inputTable=$orders$, selectMethod=NAME, colName=name, caseSensitive=false. result → $names$.

Expected result

$names$ is ["Ada","Bea"]. A table with no rows gives []. A row that is too short gives empty text.

Back to actions

Convert Header To List (dataTableConvertHeaderToList)

Get the headers as a List, with optional trimming.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
isStripTrim leading and trailing whitespaceBooleandefault falsetrue⁠: trim the spaces at the ends of the returned headers. The table does not change.

Outputs

IDTypeResultEditor field
resultListThe headers in column order.Assign headers list to

Example

Set inputTable=$orders$, isStrip=true. result → $headers$.

Expected result

$headers$ is ["id","name","qty"]. A table with no columns gives [].

Back to actions

Convert Table To Dictionary (dataTableConvertToDictionary)

Make a Dictionary from a key column and a value column, for lookups. If a key repeats, the later row wins.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
keySelectMethodSelect key column bySelectBydefault NAMENAME or INDEX for the key column. See column selection.
keyColNameInputKey column nameStringdefault ""Header of the key column.
keyColCaseSensitiveCase-sensitive comparisonBooleandefault falseCase rule for keyColNameInput⁠, as for caseSensitive in shared fields.
keyColIndexInputKey column indexNumberdefault 0Position of the key column, starting at 0.
valueSelectMethodSelect value column bySelectBydefault NAMENAME or INDEX for the value column.
valueColNameInputValue column nameStringdefault ""Header of the value column.
valueColCaseSensitiveCase-sensitive comparisonBooleandefault falseCase rule for valueColNameInput⁠.
valColIndexInputValue column indexNumberdefault 0Position of the value column, starting at 0.

Outputs

IDTypeResultEditor field
resultDictionaryKey text to value. If a key repeats, the later row wins.Assign dictionary to

Example

Set inputTable=$orders$, keySelectMethod=NAME, keyColNameInput=id, valueSelectMethod=NAME, valueColNameInput=name. result → $namesById$.

Expected result

$namesById$ is {"A1":"Ada","A2":"Bea"}. Keys keep their case and must match exactly. An empty table gives {}.

Back to actions

Convert Table To HTML (dataTableConvertToHtml)

Make HTML for a table, or for a full page. Keep escaping on for cell text you do not trust.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
includeHeaderInclude table header (<thead>)Booleandefault truetrue⁠: headers in <thead>⁠. false⁠: body rows only.
tableIdTable IDStringdefault ""HTML id, such as orders⁠. Empty: no id. Attributes are always escaped.
tableCssClassesTable CSS Class(es)Listdefault []CSS classes, such as ["grid","compact"]⁠, joined with spaces. No stylesheet is added.
tableCaptionTable CaptionStringdefault ""Caption above the table, always escaped. Empty: no caption.
enableInlineStylingEnable Inline StylingBooleandefault falsetrue⁠: use the CSS in the style fields below, such as padding:8px⁠. An empty style field adds nothing. false⁠: the style fields are ignored. An even or odd row style replaces the default row style.
tableStyle<table> StyleStringdefault ""The table.
theadStyle<thead> StyleStringdefault ""The header group.
tbodyStyle<tbody> StyleStringdefault ""The body group.
thStyle<th> StyleStringdefault ""Each header cell.
trStyleDefault <tr> StyleStringdefault ""The header row, and body rows with no even or odd style.
trEvenStyleEven <tr> StyleStringdefault ""Body rows at positions 0, 2, 4 and so on.
trOddStyleOdd <tr> StyleStringdefault ""Body rows at positions 1, 3, 5 and so on.
tdStyle<td> StyleStringdefault ""Each body cell.
escapeHtmlInCellsEscape HTML in cell dataBooleandefault truetrue⁠: headers and cells are escaped, so <b> becomes &lt;b&gt;⁠. false⁠: raw HTML, only for content you trust.
generateCompleteHtmlPageGenerate complete HTML pageBooleandefault falsetrue⁠: a full HTML page. false⁠: only the table.
customPageTitlePage TitleStringdefault ""Only with generateCompleteHtmlPage=true⁠: the page title, escaped.
additionalHeadContentAdditional <head> ContentStringdefault ""For a full page: raw HTML for <head>⁠, not escaped. Use only content you trust. Can be empty.

Outputs

IDTypeResultEditor field
resultStringThe HTML text.Assign HTML to

Example

Set inputTable=$orders$, includeHeader=true, tableId=orders, tableCaption=Orders, escapeHtmlInCells=true, generateCompleteHtmlPage=false. Leave the style fields empty. result → $html$.

Expected result

$html$ has a <table id="orders">, the caption Orders, three header cells and two body rows. No file is written and no CSS is loaded. An empty table still gives table HTML.

Back to actions

Set schema (dataTableCopySchema)

Replace or extend the columns of a table with the columns of a Record or another table. Rows keep their cells by position. No rows are copied and no values are converted.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
selectMethodSource of schemaSchemaSourcedefault recordrecord⁠: columns from inputRecord⁠. table⁠: columns from inputSchemaTable⁠.
inputRecordSource recordRecorddefault empty RecordOnly with selectMethod=record⁠. Its values are not copied.
inputSchemaTableSource tableTabledefault empty TableOnly with selectMethod=table⁠. Its rows are not copied.
updatecriteriaUpdate methodSchemaUpdatedefault overwrite_schemaoverwrite_schema⁠: replace the columns. append_schema⁠: add the source columns at the end. Extra cells are cut and missing cells are empty.

Outputs

Uses table outputs: result.

Example

Set selectMethod=record, inputRecord=$person$, inputTable=$orders$, updatecriteria=overwrite_schema. result → $reshaped$.

Expected result

$reshaped$ keeps the two rows and gets columns id,name,qty from the Record. Fewer new columns cut the last cells; more columns add empty cells. Adding an empty set of columns adds nothing.

Back to actions

Delete column (dataTableDeleteColumn)

Remove a column and its cells.

Inputs

Uses shared fields: table, columnName, columnIndex.

IDFieldType; default; requirementUse
selectedTypeselectedTypeSelectedTypedefault namename⁠: use columnName⁠. index⁠: use columnIndex⁠.

Outputs

Uses table outputs: table.

Example

Set table=$orders$, selectedType=name, columnName=qty. Output table → $withoutQty$.

Expected result

$withoutQty$ has headers id,name and rows A1,Ada and A2,Bea.

Back to actions

Delete row (dataTableDeleteRow)

Remove one row by its position. Test on sample data first.

Inputs

Uses shared fields: table.

IDFieldType; default; requirementUse
inputPositionDelete row at indexNumberdefault 0Position of an existing row, starting at 0. The row count is not a valid position.

Outputs

Uses table outputs: table.

Example

Set table=$orders$, inputPosition=0. Output table → $remaining$.

Expected result

$remaining$ has only A2,Bea,10, with the same columns. An empty table fails.

Back to actions

Get column name (dataTableGetColumnName)

Get a header by its column position.

Inputs

Uses shared fields: table, columnIndex.

Outputs

IDTypeResultEditor field
columnNameStringThe header.Assign column name to variable

Example

Set table=$orders$, columnIndex=1. columnName → $header$.

Expected result

$header$ is name. Here a position other than 0 to 2 fails. An empty header gives empty text.

Back to actions

Get number of columns (dataTableGetNumberOfColumns)

Count all columns, or only columns with content.

Inputs

Uses shared fields: table.

IDFieldType; default; requirementUse
columnCountSelectioncolumnCountSelectionColumnCountSelectiondefault totalColumnSelectiontotalColumnSelection⁠: all columns. nonEmptyColumnCountSelection⁠: columns with at least one cell that is not empty. A cell with only spaces counts as not empty.

Outputs

IDTypeResultEditor field
resultNumberThe count.Assign result to variable

Example

Set table=$orders$, columnCountSelection=totalColumnSelection. result → $width$.

Expected result

$width$ is 3. With no rows, the total still counts the columns, and the content count is 0.

Back to actions

Get number of rows (dataTableGetNumberOfRows)

Count all rows, or only rows with content.

Inputs

Uses shared fields: table.

IDFieldType; default; requirementUse
rowCountSelectionrowCountSelectionRowCountSelectiondefault totalRowSelectiontotalRowSelection⁠: all rows. nonEmptyRowSelection⁠: rows with at least one cell that is not empty. A cell with only spaces counts as not empty.

Outputs

IDTypeResultEditor field
resultNumberThe count.Assign result to variable

Example

Set table=$orders$, rowCountSelection=totalRowSelection. result → $height$.

Expected result

$height$ is 2. An empty table gives 0.

Back to actions

Insert column (dataTableInsertColumn)

Insert a new typed column, or copy a column from another table.

Inputs

IDFieldType; default; requirementUse
toTableDestination tableTabledefault empty TablerequiredThe table that gets the column. Its rows and columns stay.
positionSelectedInsert column at indexPositionSelecteddefault lastPositionfirstPosition⁠: at the start. lastPosition⁠: at the end. specificPosition⁠: at specificColumnNumber⁠.
specificColumnNumberspecificColumnNumberNumberdefault 0Only with positionSelected=specificPosition⁠: position from 0 to the column count.
insertColumnSelectionInsert columnInsertColumnSelectiondefault customcustom⁠: a new typed column with one default value in each row. source⁠: copy a column from fromTable⁠.
fromTableEnter data fromTabledefault empty TableOnly with insertColumnSelection=source⁠: the table with the column to copy.
selectFromColumnselectFromColumnSelectedTypedefault nameOnly with source⁠: name uses fromColumnName⁠, index uses fromColumnIndex⁠.
fromColumnNamefromColumnNameStringdefault ""Header of the column to copy. Exact case first.
fromColumnIndexfromColumnIndexNumberdefault 0Position of the column to copy, starting at 0.
customColumnNameColumn nameStringdefault ""Only with custom⁠: the header, such as status⁠. Empty: Column and the new position, starting at 1.
columnTypeColumn typeColumnTypedefault StringString⁠, Number⁠, Boolean or Datetime⁠. Only the matching default value is used (see typed values).
defaultValueStringDefault valueStringdefault ""Only with columnType=String⁠: such as new⁠, or a String variable.
defaultValueNumberDefault valueNumberdefault 0Only with columnType=Number⁠.
defaultValueDatetimeDefault valueDatetimedefault 0001-01-01T00:00:00+00:00Only with columnType=Datetime⁠.
defaultValueBooleanDefault valueBooleandefault falseOnly with columnType=Boolean⁠.

Outputs

IDTypeResultEditor field
toTableTableThe table with the new or copied column.Destination table

Example

Set toTable=$orders$, positionSelected=lastPosition, insertColumnSelection=custom, customColumnName=approved, columnType=Boolean, defaultValueBoolean=false. toTable → $review$.

Expected result

$review$ has a fourth Boolean column approved, with false in both rows. A custom column adds no rows to an empty table. Copying uses the larger row count; missing cells are empty text.

Back to actions

Insert row (dataTableInsertRow)

Insert a Record as a row. Cells go to the columns with the same header.

Inputs

Uses shared fields: table.

IDFieldType; default; requirementUse
positionSelectionInsert row at indexPositionSelecteddefault lastPositionfirstPosition⁠: at the start. lastPosition⁠: at the end. specificPosition⁠: at inputPosition⁠.
inputPositioninputPositionNumberdefault 0Position starting at 0. The row count is allowed (the end).
rowRecordRow record nameRecorddefault empty RecordThe Record to insert. Headers match with exact case first. For each header with no match, use the cell at the same position if both have the same number of columns, else empty text.

Outputs

Uses table outputs: table.

Example

Set table=$orders$, positionSelection=lastPosition, rowRecord=$person$. Output table → $extended$.

Expected result

$extended$ has three rows: A1,Ada,2 is added at the end. A table with no columns takes the columns of the Record. Cells with no match are empty text. A position after the row count fails.

Back to actions

Join (dataTableJoin)

Add data from a second table where the key cells have the same text. The result keeps all columns of both tables, also both key columns.

Inputs

IDFieldType; default; requirementUse
firstTableEnter first data table nameTabledefault empty TablerequiredThe left table, such as $orders$⁠.
firstColumnNameEnter column name for first tableStringdefault ""Key header, such as id⁠. Exact case first. Key cells must match with exact case.
secondTableEnter second data table nameTabledefault empty TablerequiredThe right table.
secondColumnNameEnter column name for second tableStringdefault ""Key header, such as id⁠. Exact case first. Key cells must match with exact case.
joinTypeSelect type of joinJoinTypedefault INNER_JOININNER_JOIN⁠: only matches. LEFT_JOIN⁠: also left rows with no match. RIGHT_JOIN⁠: also right rows with no match. OUTER_JOIN⁠: also rows with no match from both sides. Cells of the missing side are empty text.

Outputs

IDTypeResultEditor field
joinedTableTableAll columns of both tables and the joined rows.Enter name of data table in which to join

Example

Make $cities$ with String headers id,city and rows A1,Lima and A3,Cusco. Set firstTable=$orders$, firstColumnName=id, secondTable=$cities$, secondColumnName=id, joinType=LEFT_JOIN. joinedTable → $joined$.

Expected result

$joined$ has headers id,name,qty,id,city. The first row is A1,Ada,2,A1,Lima. The second row is A2,Bea,10 and two empty cells. A key that repeats gives one row for each matching pair.

Left join keeps both orders and adds matching city data.
LEFT_JOIN keeps both left rows and both key columns. Missing right-side values become empty Strings. View full size

Back to actions

Merge (dataTableMerge)

Add the rows of a second table after the first. The headers must have the same names, order and case.

Inputs

IDFieldType; default; requirementUse
firstDataTableEnter first data table nameTabledefault empty TablerequiredIts rows come first.
secondDataTableEnter second data table nameTabledefault empty TablerequiredIts rows come after the first table.

Outputs

IDTypeResultEditor field
mergedTableTableThe columns of the first table, its rows, then the rows of the second.Enter name of the data table in which to merge

Example

Set firstDataTable=$orders$, secondDataTable=$orders$. mergedTable → $combined$.

Expected result

$combined$ has four rows: the two rows twice. Different headers fail. The column types need not match, and no cell is converted.

Back to actions

Normalize headers (dataTableNormalizeHeaders)

Clean up the spaces and case of the headers before actions that use header names.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
normalizeSpacesNormalize whitespaceBooleandefault falsetrue⁠: change each run of spaces to one space and trim the ends. Runs first.
removeAllWhitespaceRemove all whitespaceBooleandefault falsetrue⁠: remove all spaces from the headers. Runs second.
convertCaseConvert caseConvertCasedefault NONENONE⁠: keep the case. LOWERCASE or UPPERCASE⁠. Runs last.

Outputs

Uses table outputs: result.

Example

Make a Table $messy$ with header First Name and one cell Ada. Set inputTable=$messy$, normalizeSpaces=true, removeAllWhitespace=false, convertCase=LOWERCASE. result → $normalized$.

Expected result

The header becomes first name and the cell stays Ada. The action can make two headers the same and does not fix that. Case conversion does not use the Device language.

Back to actions

Remove duplicate rows (dataTableRemoveDuplicateRows)

Keep the first of each set of rows that have the same text in all cells.

Inputs

Uses shared fields: table.

Outputs

Uses table outputs: table.

Example

First merge $orders$ with itself into $combined$. Set table=$combined$. Output table → $unique$.

Expected result

$unique$ has the two original rows, in their order. Rows that differ only in case stay. Cells are joined with the character U+001F to compare rows, so two rows whose cells contain that character can be seen as equal.

Back to actions

Remove empty columns (dataTableRemoveEmptyColumns)

Remove columns where every cell is empty or only spaces.

Inputs

Uses shared fields: inputTable.

Outputs

Uses table outputs: result.

Example

Make $sparse$ with headers a,b and rows x, and ,. Set inputTable=$sparse$. result → $compactColumns$.

Expected result

Only column a stays, with cells x and empty text. A table with no rows loses all its columns.

Back to actions

Remove empty rows (dataTableRemoveEmptyRows)

Remove rows where every cell is empty or only spaces. Note that the row count in Get number of rows counts a row with only spaces.

Inputs

Uses shared fields: inputTable.

Outputs

Uses table outputs: result.

Example

Make $sparse$ with headers a,b and rows x, and ,. Set inputTable=$sparse$. result → $compactRows$.

Expected result

Both headers stay and only row x, stays. Cells such as 0 and false are content and keep their row.

Back to actions

Reverse table (dataTableReverseRowOrder)

Reverse the order of the rows, so the last row comes first. No sorting, and the columns do not change.

Inputs

Uses shared fields: inputTable.

Outputs

Uses table outputs: result.

Example

Set inputTable=$orders$. result → $reversed$.

Expected result

The rows are A2,Bea,10 then A1,Ada,2.

Back to actions

Search for a value (dataTableSearchForAValue)

Find every cell whose full text is the value.

Inputs

Uses shared fields: table.

IDFieldType; default; requirementUse
valueEnter value to search forAnydefault empty StringrequiredThe value to find. The full cell text must match, not a part of it.
matchCaseMatch caseBooleandefault falsetrue⁠: exact case. false⁠: case is ignored.

Outputs

IDTypeResultEditor field
resultListOne row,column text for each match, positions starting at 0.Assign result to variable

Example

Set table=$orders$, value=Ada, matchCase=true. result → $hits$.

Expected result

$hits$ is ["0,1"]. No match gives []. Ad does not match Ada.

Back to actions

Set value of a single cell (dataTableSetCellValue)

Replace one cell. The text is read as the type of the column, so a Number or Boolean column keeps its type.

Inputs

Uses shared fields: table, rowPosition, columnName, columnIndex.

IDFieldType; default; requirementUse
columnTypeColumn byCellColumnTypedefault colNamecolName⁠: use columnName⁠. colIndex⁠: use columnIndex⁠.
valueSet value of table cellStringdefault ""New text, read as the column type: Ana (String), 3.5 (Number), true in lowercase (Boolean).

Outputs

Uses table outputs: table.

Example

Set table=$orders$, rowPosition=0, columnType=colName, columnName=name, value=Ana. Output table → $corrected$.

Expected result

The first row is A1,Ana,2. Text that is not valid for the column type fails. An empty value gives an empty String cell, also in a Number or Boolean column.

Back to actions

Set row as header (dataTableSetRowAsHeader)

Use a row as the headers, and remove it if you want. All columns become String.

Inputs

Uses shared fields: inputTable, rowPosition.

IDFieldType; default; requirementUse
isRowToBeRemovedRemove row from tableBooleandefault truetrue⁠: remove the row. false⁠: keep it as data.

Outputs

Uses table outputs: result.

Example

Set inputTable=$orders$, rowPosition=0, isRowToBeRemoved=true. result → $promoted$.

Expected result

The headers are A1,Ada,2, and only row A2,Bea,10 stays. Other cells are not converted. Empty or repeated cells give empty or repeated headers.

Back to actions

Extract table columns (dataTableSliceColumns)

Keep only some columns, in the order you give, for example before an export.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
selectMethodSelect columns byColumnSelectordefault INDEX_LISTINDEX_LIST⁠: use indexList⁠. COLUMN_NAMES⁠: use columnNameList⁠.
indexListColumn indexesListdefault []Only with INDEX_LIST⁠: positions starting at 0, such as [0,2]⁠. Order and repeats are kept.
columnNameListColumn namesListdefault []Only with COLUMN_NAMES⁠: headers in output order, such as ["name","id"]⁠. The first match with case ignored wins: with Name,name⁠, name gives Name⁠.

Outputs

Uses table outputs: result.

Example

Set inputTable=$orders$, selectMethod=COLUMN_NAMES, columnNameList=["name","id"]. result → $selected$.

Expected result

The headers are name,id, with rows Ada,A1 and Bea,A2. An empty List gives no columns but keeps the row count.

Back to actions

Extract table rows (dataTableSliceRows)

Keep a range of rows (end not included) or a List of rows.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
selectMethodSelect rows byRowSelectordefault RANGERANGE⁠: from start to end, end not included. INDEX_LIST⁠: use indexList⁠.
startRowIndexStart row indexNumberdefault 0Only with RANGE⁠: first row, from 0 to the row count.
endRowIndexEnd row indexNumberdefault 0Only with RANGE⁠: the row after the last, from the start to the row count.
indexListRow indexesListdefault []Only with INDEX_LIST⁠: positions starting at 0, such as [0,2]⁠. Order and repeats are kept.

Outputs

Uses table outputs: result.

Example

Set inputTable=$orders$, selectMethod=RANGE, startRowIndex=0, endRowIndex=1. result → $firstOnly$.

Expected result

$firstOnly$ has only A1,Ada,2. The same start and end give an empty table with the same columns. An end before the start fails.

Back to actions

Sort (dataTableSort)

Sort the rows by one column, using its column type: text in character-code order, or Number order.

Inputs

Uses shared fields: table, columnName, columnIndex.

IDFieldType; default; requirementUse
sortOptionsSort by columnChangeOptionsdefault NAMENAME or INDEX⁠. See column selection.
sortTypeSelect the order in which to sortSortTypedefault ASCENDINGASCENDING or DESCENDING⁠. Rows with equal values keep their order.

Outputs

Uses table outputs: table.

Example

First use Change column type on qty with changeType=Number, into $numericOrders$. Set table=$numericOrders$, sortOptions=NAME, columnName=qty, sortType=DESCENDING. Output table → $sorted$.

Expected result

The rows are A2,Bea,10 then A1,Ada,2. In a Number, Boolean or date column, an empty or invalid cell has no value and comes before valid values in ascending order.

Back to actions

Trim headers (dataTableTrimSchema)

Trim the spaces at the ends of the headers. Spaces inside and the cells do not change.

Inputs

Uses shared fields: inputTable.

Outputs

Uses table outputs: result.

Example

Make $messy$ with header First Name and cell Ada. Set inputTable=$messy$. result → $trimmed$.

Expected result

The header is First Name, with its two inside spaces. Trimming can make two headers the same.

Back to actions

Update cell (dataTableUpdateCell)

Replace one cell with a typed value. Its type becomes the column type, and the other cells are not converted.

Inputs

Uses shared fields: inputTable, colName, caseSensitive, colIndex.

IDFieldType; default; requirementUse
selectMethodSelect column bySelectBydefault NAMENAME or INDEX⁠. See column selection.
rowIndexRow indexNumberdefault 0Position of an existing row, starting at 0.
newValueNew value of cellAnydefault empty StringA typed value, such as String $replacement$ that contains Ana⁠.

Outputs

Uses table outputs: result.

Example

Make String variable $replacement$ with value Ana. Set inputTable=$orders$, selectMethod=NAME, colName=name, rowIndex=0, newValue=$replacement$. result → $updated$.

Expected result

The first name is Ana, the second is still Bea, and the name column is String. To convert all cells of a column, use Change column type.

Back to actions

Write to file (dataTableWriteToFile)

Write the rows to a delimited file. Replace the file or add to it. Test with a sample file first.

Inputs

Uses the export formats: rowDelimiter, otherRowDelimiter, columnDelimiter, otherColumnDelimiter, encoding.

IDFieldType; default; requirementUse
sourceTableData table nameTabledefault empty TablerequiredThe table to write, such as $orders$⁠.
filePathEnter file nameStringdefault ""requiredPath such as samples/orders.csv⁠. A relative path starts at the working folder of the Run.
createDirectoriesCreate folders/files if it doesn't existBooleandefault falsetrue⁠: create missing parent folders. false⁠: the parent folders must exist. A new file is made in both cases.
appendToExistingFileWhen writingAppendToExistingFiledefault overwriteoverwrite⁠: replace the file and write the header. append⁠: add the rows. A file with content gets no new header and no line break before the new rows. A new or empty file gets a header.

Outputs

None. The result is the file.

Example

Set sourceTable=$orders$, filePath=samples/export.csv, createDirectories=true, appendToExistingFile=overwrite, rowDelimiter=NEW_LINE, columnDelimiter=COMMA, encoding=UTF_8_WITHOUT_BOM.

Expected result

The file has id,name,qty\nA1,Ada,2\nA2,Bea,10\n, with LF line breaks and no byte order mark. A folder or access error fails the step.

Back to actions

Write to file stream (dataTableWriteToFileStream)

Write a full delimited file and return its full path as text. Parent folders are created and an existing file is replaced.

Inputs

Uses the export formats: rowDelimiter, otherRowDelimiter, columnDelimiter, otherColumnDelimiter, encoding.

IDFieldType; default; requirementUse
sourceTableData table nameTabledefault empty TablerequiredThe table to write, such as $orders$⁠.
fileNameFile nameStringdefault ""requiredPath such as samples/orders.csv⁠. A relative path starts at the working folder of the Run.

Outputs

IDTypeResultEditor field
fileStringThe full path of the file on the Device.Assign file to a variable

Example

Set sourceTable=$orders$, fileName=samples/stream-export.csv, rowDelimiter=NEW_LINE, columnDelimiter=COMMA, encoding=UTF_8_WITHOUT_BOM. file → $exportPath$.

Expected result

$exportPath$ is the full path of the file, ending in samples/stream-export.csv with the path separators of the Device. The file has one header and the two rows, each with LF at the end. A permission error fails the step.

Back to actions

Conditions

Table column count (dataTableColumnCondition)

Compare the number of columns, also empty ones, with a number.

Inputs

Uses shared fields: table, and the count comparison: condition.

IDFieldType; default; requirementUse
columnCountValueNumberdefault 0The number to compare with, such as 2⁠.

Outputs

No outputs. Use it in an If step.

Example

Set table=$orders$, condition=EQ, columnCount=3.

Expected result

The condition is true: the table has three columns. With columnCount=2, it is false. A table with no columns has count 0.

Back to conditions

Table has columns (dataTableHasColumns)

Check that all the headers you list are in the table. Does not include is true when at least one is missing.

Inputs

Uses shared fields: inputTable, caseSensitive.

IDFieldType; default; requirementUse
conditiontypeConditionContainsConditiondefault CONTAINSCONTAINS (Includes): all headers are there. NOTCONTAINS (Does not include): the opposite.
columnNamesColumn namesListdefault []requiredHeaders, such as ["id","name"]⁠. An empty List counts as all present.

Outputs

No outputs. Use it in an If step.

Example

Set inputTable=$orders$, conditiontype=CONTAINS, columnNames=["id","name"], caseSensitive=false.

Expected result

The condition is true. Add missing to the List and it is false; NOTCONTAINS then gives true. An older step with a single column name still opens as this condition, but its old colName is not read: set columnNames.

Back to conditions

Table row count (dataTableRowCondition)

Compare the number of rows, also empty ones, with a number.

Inputs

Uses shared fields: table, and the count comparison: condition.

IDFieldType; default; requirementUse
rowCountValueNumberdefault 0The number to compare with, such as 2⁠.

Outputs

No outputs. Use it in an If step.

Example

Set table=$orders$, condition=GT, rowCount=0.

Expected result

The condition is true for the two rows. An empty table gives false. Use EQ with 0 to find an empty table.

Back to conditions

Table headers are blank (dataTableSchemaBlank)

Test whether all headers are blank, or at least one is not. Cells are ignored.

Inputs

Uses shared fields: inputTable.

IDFieldType; default; requirementUse
conditiontypeConditionBlankHeadersdefault ALL_HEADERS_BLANKALL_HEADERS_BLANK⁠: all headers are empty or only spaces, also when there are no columns. ANY_HEADER_NOT_BLANK⁠: the opposite.

Outputs

No outputs. Use it in an If step.

Example

Set inputTable=$orders$, conditiontype=ANY_HEADER_NOT_BLANK.

Expected result

The condition is true. ALL_HEADERS_BLANK gives false. A table with no columns gives true for ALL_HEADERS_BLANK and false for ANY_HEADER_NOT_BLANK.

Back to conditions