330
Views
10
Solved
###### current row number 0
Question

Hi Guys,

this might be a easy one but somehow I did not get the trigger...

I am using a mobile app to scan barcodes to a list. The user shall know the amount of scanned barcodes. therefore I use CurrentRowNumber in a "Numbers Badge". But this starts with row 0. Is there a possibility to start counting with row 1? Actually it is row 1...

Thanks!

Tobias

Rank: #3836
Solution

Hi Guys,

I using a local variable and a list in my mobile app.

`Barcode.Current + " " + Barcode.CurrentRowNumber + 1`

is how I did it.

And the solution is:

`Barcode.Current + " " + (Barcode.CurrentRowNumber + 1)`

Talking about mathmatics and logic. I am pretty sure that having the first row as row 0 is wrong and I don´t understand this logic of Outsystems...

Tobias

MVP
Rank: #24

By design, the first row number is always 0. What you can do is to display CurrentRowNumber + 1. ;)

Rank: #3836

Hi Joao,

thanks for replying on the weekend!

Using CurrentRowNo + 1 makes it 01, 11, 21, etc...

Best regs

Tobias

MVP
Rank: #24

You're using CurrentRowNumber property from a TableRecords, right?

Please post details of how you're coming to this result...

Rank: #3836
Solution

Hi Guys,

I using a local variable and a list in my mobile app.

`Barcode.Current + " " + Barcode.CurrentRowNumber + 1`

is how I did it.

And the solution is:

`Barcode.Current + " " + (Barcode.CurrentRowNumber + 1)`

Talking about mathmatics and logic. I am pretty sure that having the first row as row 0 is wrong and I don´t understand this logic of Outsystems...

Tobias

MVP
Rank: #18

Old school basic and VBA are 1 based I think. But most languages I have programmed in over 40 years are zero based.

``Option Base 0``
``Option Base 1``