Create a new element

Updated at March 2nd, 2022

Create a new data column

Add a data process and include code that defines your new column. Below are two different examples, one to create a sum column and another to create a variable based off existing data.

Example code


rows.forEach(function(row) {
    //Create sum column
    row.Q2_sum = (+row.Q2_1) + (+row.Q2_2) + (+row.Q2_3)	

    //Create variable based off logic
    if (row.S14 == 2 || row.S14 == 3) row.awareness = "Aware"
    else row.awareness = "Not aware"
});


Delete


After you run the code, and reload the project all new columns appear as elements in the Fields tab.


Create an empty element

To add an intro element, go to the "More properties..." dialog for the group (e.g. Screener). Reference a new item "Intro" as the first item in the "children" attribute. 

Result:



Was this article helpful?