module function · N/dataset

createColumn()

dataset.createColumn(options)

Creates a dataset column.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
dataset.createColumn(options)
Module
N/dataset
Returns
dataset.Column
Governance
None
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2020.2
call shapefrom Oracle's parameter table
1dataset.createColumn({2    alias:   /* string, optional */,3    fieldId: /* string */,4    formula: /* string */,5    join:    /* dataset.Join, optional */,6    id:      /* number, optional */,7    label:   /* string, optional */,8    type:    /* string */9});
Oracle reference for this method
ParameterTypeRequiredDescription
options.aliasstringoptionalThe alias for the column. This can be used to get the expression for the column which can be used in a workbook. Use Dataset.getExpressionFromColumn(options) to get the expression.
options.fieldIdstringThe field ID for the column (exclusive with formula/type).
options.formulastringThe formula for the column, such as '{email}' or '{total} - {tax}'.
options.joindataset.JoinoptionalThe joined record on which the field is present.
options.idnumberoptionalThe ID of the column. This can be used to get the corresponding expression for the column which can be used in a workbook. Use Dataset.getExpressionFromColumn(options) to get the expression.
options.labelstringoptionalThe column label to display in the UI.
options.typestringThe return type of the formula, such as 'INTEGER' or 'STRING'.
B

No Mynt syntax yet.

Nothing in the language compiles to dataset.createColumn(options) today. How should it read?

C

Competing syntax for createColumn, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/dataset · dataset.createColumn(options)

Suggest syntax for createColumn