Hi all,
I’ve spent multiple hours trying to get this to work but I’m struggling.
I have a collection called “Standings” that contains various players, scores, total points etc. This is linked to a table on my site that is controlled by multiple drop down boxes to view historical scores.
I have that part working, but what I’d like to have is an automatic row numbering system that adds a 1,2,3,4 etc onto the table for the persons current position within the standings. This could be 1-6, or 1-12 etc, dependant on the amount of rows returned on the data selected.
I have added a blank column at the start of my table via:
let cols = $w ( “#table2” ). columns ;
cols . unshift ({
“id” : “rownumber” ,
“dataPath” : “rowNumber” ,
“label” : “#” ,
“width” : 40 ,
“visible” : true ,
“type” : “string”
});
$w ( “#table2” ). columns = cols ;
However I cannot seem to get the numbering system to work despite trying many things!
Please could anyone assist?
Thanks,