Millisecond Forums

Question about the Counter

https://forums.millisecond.com/Topic14045.aspx

By DrLand - 8/21/2014

Back again :)
I am wanting to display the trial number. Rather than creating a text element (e.g., "1" "2" ....) to do this, I was playing with the following code /items ("trial = <% trial.numbers.count %>  ")
This works, but the first trial starts as 0 rather than 1. Is there a way I can set the counter to start at 1 instead of 0?
By Dave - 8/21/2014

You can do

/ items ("trial = <% trial.numbers.count + 1 %>  ")

By DrLand - 8/21/2014

Yep, that's it.
I had tried /items = ("trial = <% trial.numbers.count %> + 1 "). So I was close. Thanks again.
/ items ("trial = <% trial.numbers.count + 1 %>  ") - See more at: http://www.millisecond.com/forums/Topic14045.aspx#sthash.rTbaM6dp.dpuf
/ items ("trial = <% trial.numbers.count + 1 %>  ") - See more at: http://www.millisecond.com/forums/Topic14045.aspx#sthash.rTbaM6dp.dpuf
/ items ("trial = <% trial.numbers.count + 1 %>  ") - See more at: http://www.millisecond.com/forums/Topic14045.aspx#sthash.rTbaM6dp.dpuf