Add Column In Data Table Step
The "Add Column In Data Table" step puts a new column into a data table you already have. Use this step to change how your data table is set up while your automation runs. You can name the new column, pick its data type, and give a default value for rows that are already there.
How to Use Add Column In Data Table
Put a new column into a data table variable in your workflow.
Step 1: Add the "Add Column In Data Table" Step
- Drag the "Add Column In Data Table" step into your workflow.
Step 2: Set Up the Column Details
- In the step properties, find the Data Table field. Pick the data table variable where you want to add the column.
- In the Column Name field, type a name for your new column.
- In the Type field, choose what kind of data the new column will hold.
Important: The types of data you can use are:
- Integer: For whole numbers.
- Decimal: For numbers with decimal points.
- Boolean: For true/false answers.
- String: For text. You can set these to NULL.
- DateTime: For dates and times.
Step 3: Set Default Values for Rows That Already Exist
- If you picked String as the data type, you'll see the Set NULL for all existing rows option.
- Choose
T(true) to make all existing rows in the new column NULL. - Choose
F(false) to set a specific value for all existing rows. This is the usual setting.
- Choose
- If Set NULL for all existing rows is
F, or if your data type isn't String, type a value in the Value field. This value will fill the new column for all rows that are already there.
Important: For all data types except String, you have to give a specific value. You can't use NULL for these types.
What the Settings Mean
Step name (Optional)
- A name you choose for this step in your process.
Data Table (Required)
- The data table variable where you want to add the new column.
Column Name (Required)
- The name of the new column.
Type (Required)
- The kind of data the new column will hold.
- Example:
String,Integer,Decimal,Boolean,DateTime
Set NULL for all existing rows (Required)
- This controls if existing rows in the new column start with NULL values.
- You only see this option when the Type is
String. - T (true): Makes existing rows NULL.
- F (false): Lets you set a specific Value.
Value (Required)
- The first value for the new column in all existing rows.
- You must fill this field if Set NULL for all existing rows is
F. - For all types except
String, you have to set a value. NULL is not allowed.
Related Articles
- Create New Data Table Step
- Delete Column In Data Table Step
- Add Row In Data Table Step
- Update Value In Data Table Step
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.