How to Target a Sub-Item by its Name

You have a list of sub-items and you want to set the date of the one named "Template and Content Creation" to today's date.

Solution

The solution is to create the following formula in the parent board (NOT the sub-item board):

1:[ItemName]="Template and Content Creation"

2:[Names]={Sub.Name}

3:[ItemPosition]=FINDPOSITION([ItemName],[Names])

4:{Sub.Date#[ItemPosition]}=TODAY()

Explanations

  • The 1st line is not absolutely necessary, but it makes the formula look nicer and easier to modify should you need to modify the name of the sub-item: it simply assigns the searched name to a variable called [ItemName] that is used later on line 3;
  • The 2nd line creates a list of all sub-item names and stores it in the [Names] variable;
  • The 3rd line gives us the position of the searched name in the list of names and stores it in the [ItemPosition] variable;
  • Now that we know that the sub-item we want to modify is the [ItemPosition]th sub-item, we simply add the position as the suffix of the date placeholder.

Here is a screenshot of the simulation result:

On line 2, you can see the list of the 2 names. On line 3, the position searched is 2 and finally on line 4, we only target the 2nd item, thanks to the #2 suffix.

The use of the position suffix is critical

Without the suffix, all the sub-items would be updated.

{Sub.Date}=TODAY()=> Updates all sub-items

With the suffix, only the 2nd sub-item is updated.

{Sub.Date#[ItemPosition]}=TODAY()=> Updates only sub-item #2 since [ItemPosition] equals 2

Variant: targeting various sub-items by their name

FINDPOSITION looks for the 1st match. So, if several items have the same name, the formula only updates the 1st of them.

Should there be multiple sub-items with identical names, and your goal is to update each of them, substitute FINDPOSITION with FINDPOSITIONS.

  • FINDPOSITIONS returns a list of positions if more than 1 match is found;
  • [ItemPosition] would become a list of positions, like "1|2";
  • This wouldn't be a problem for the column suffix.

Allowed column position suffixes

A position suffix is typically a variable. It may contain a single position, as seen above, or a list of positions.

1: [Pos]="1|2|4"

2: {GroupItems.Status#[Pos]}="Done" => Sets the status of items #1,2 and 4 (in the group) as Done

The only other allowed value for a position suffix is a single number:

1: {BoardItems#_4_.Text}="4th item"

Below are examples of values that are not allowed. You'll need to assign the value to a variable first.

1: {BoardItems#_4|5_.Text}="WON'T WORK" => Won't work. Can't hardcode a list of numbers.

1: {BoardItems#_{Number}_.Text}="WON'T WORK" => Won't work. Can't use a column as suffix.

A final note on column position suffixes

If you use a list of positions as suffix, you may assign it a list of values, instead of a single value. Here is an example:

1: [Pos]="1|2|4"

2: {GroupItems.Status#[Pos]}="Done|Working on it|Stuck" => Sets each item with its own specific status