adding table number

hello, I add table to display my database collection in my page ,so client can look at it, it has many data on there, but my client ask "could you add number on the left of table so we can know how much rows / items it has,
I can’t seems find “number” function, the table doesn’t have number on its left side
could someone pls help me ?
I searched it in forum but didn’t find any

need to add number like this, so I know how much transaction I have, its easy to look at database,

  • this table is for driver , so they know how much passengers they have , I cant give access to database to driver, so I make this table for them,

You will need to this with code.

You can define the columns that you want to be displayed by using the Table.columns property. Set this property to an array of column definitions as shown in the documentation .

To provide the value to be displayed in the added column, set the Table.rows property to an array of values that includes the added number field.

I read, but seems I dont understand, do you write the code in “page code” below the editor ? , I wrote the code but it says to debug open sksdz.js ?
this is my first time with wix, please forgive my noob brains

is the code like this

let cols = $w("#table2").columns;
cols.push( {
  "id": "newCol",
  "dataPath": "new_col",
  "label": "Number",
  "width": 100,
  "visible": true,
  "type": "string"
} );
$w("#myTable").columns = cols;

ok, I can add column now , and I need to make it go to left side, and and number

@diananovianti1191 You can add the column at the beginning by using the unshift() function:

let cols = $w("#table2").columns;
cols.unshift( {
   "id": "newCol",
   "dataPath": "new_col",
   "label": "Number",
   "width": 100,
   "visible": true,
   "type": "string"
} );
$w("#myTable").columns = cols;


To get the number in the column, you will need to build the array of rows, and then set the Table.rows property to the array of values that includes the added number field.