Using the Position Indicator

The position indicator is essential to reading and updating multiple items. This works with any prefix referring to multiple items: Sub, DepItems, GroupItems, BoardItems, Board2Items, Board3Items.

Reading a specifix item in a list of items

Let's take an example. You retrieve all the column values in a board, using the BoardItems prefix.

1:[AllDates]={BoardItems.Date}=> 2024-05-01|2024-05-15|2024-05-30

But you really only want the 2nd value. For this, use the #2 position indicator.

1:[2ndDateInList]={BoardItems.Date#2}=> 2024-05-15.

This is particularly useful when combined with a variable. Here we first get the position of the item named 'Next Shipment' and store it in a variable:

1:[Pos]=FINDPOSITION("Next Shipment",{BoardItems.Name}) => 3

Then we read only the value of this item by using the variable in the position indicator

2:[NextShipmentDate]={BoardItems.Date#[Pos]}=> 2024-05-30.

Reading specific items in a list of items

You can use multiple positions in the position indicator, but only through a variable:

[Pos]="1|3"

2:[Dates]={BoardItems.Date#Pos}=> 2024-05-01|2024-05-30

Updating specific items in a list of items

The position indicator can be used to update specific items as well. The principle is exactly the same.

[Pos]="3"

2:{BoardItems.Date#Pos}=TODAY()=> Set the date of the 3rd item to today's date

[Pos]="1|3"

2:{BoardItems.Date#Pos}=TODAY()=> Set the date of the 1st and 3rd item to today's date