Creating a Sub-Item, then Populating its Columns

Creating a sub-item of the current item

To create a sub-item, use the CREATESUBITEM function. Provided your formula is created in a parent board (that has sub-items). It will be added at the end of the list of the existing sub-items of the current item (the one that triggers the formula).

1:[Pos]=CREATESUBITEM("New Task")-> Creates a sub-item named "New Task"

Creating a sub-item in another board

To create an item in another board, select this other board as Board2 or Board3 (see Interacting with related items (ie. other items than the one that triggers the formula) for more on this.

1:[Pos]=CREATESUBITEM("Write marketing Plan",7,"Board2")

The above formula creates a sub-item named "Write marketing Plan" under the 7th item of Board2.

Populating the newly created sub-item's columns with values

The CREATESUBITEM function returns the position of the newly created sub-item in the set of sub-items. As we saw in the Position Indicator article, this value can be used to fill in the column values.

What is the correct set of sub-items?

  • If you are creating a sub-item under the current item, the set of sub-items is the list of sub-items of the current item, which means you need to use the Sub prefix to access it.

Here is an example: we create a subitem under the current sub-item, then set its Status to 'Working on it' using the Sub prefix and the position of the newly created sub-item.

1:[Pos]=CREATESUBITEM("New Task") => Returns 8 if there were 7 sub-items

2:{_Sub_.Status#[Pos]}="Working on it" => Sets the status of the newly created sub-item

  • If you are creating a sub-item under an item in Board2, the set of sub-items is the list of sub-items of the other board. In this case, you access it using the AliasSub prefix.

Below, we create a subitem under an item of a board designated with alias "Board", then set its Status to 'Working on it'. We use the Board2Sub prefix.

1:[Pos]=CREATESUBITEM("New Task",7,"Board2")

2:{_Board2SubItems_.Status#[Pos]}="Working on it" => Sets the status of the newly created sub-item