Numbering repeated jumplist items

Jumplists can help you and the end user to keep track of where you are in the application. To make your application more organized, as well as a little easier on the eye, we will jumplists to the nodes. The repeat logic keeps track of how many times it is used in the jumplist window, but as soon as you start to enter more than five employees, the overview that you gain with jumplists is quickly lost. To bring back that organization, we can give each employee a number.

making an overview with jumplists
making an overview with jumplists

To do this, browse to the starting node of the graph person. Here, add a formula called ‘counter’, that includes a function called getvaluefromcallingnode(). For now, you don’t need to worry about what this function does, they will be discussed in full detail later on. Set the variable to ‘counter’.

adding a jumplist counter with
adding a jumplist counter with

The function that we are using takes the value from the counter that you have made earlier and puts it in the variable counter in the current node. So, what you’re basically adding to this variable is the number of employees that you have added.

In order to have the counter shown in the jumplist, navigate to the information node of the employee graph. Next, we will enter a variable into the jumplist the same way we do in text. So you’ll have something like this: “Information employee ^start.counter“. Note that start.counter is the number of the employee, and 'Information employee: ’ is just plain text.

If you run the application now, the title that will appear on the information screen includes the number of employees. However, you’ll notice that the first entry ends with a zero. This is because the Studio starts counting at zero.

adding the label to the repeat
adding the label to the repeat

However, this is very easy to change. You will just have to go to the formula you have added, and add one to the value. The end result of the formula will then be getvaluefromcallingnode('counter') + 1.

making the jumplist counter "human"
making the jumplist counter “human”