Not a big problem per se, but I would like to solve it. Here it is. In a list view form I want to show the index numbers of the displayed records. The are many thousand records and the index number helps navigating through them. I have therefore created a label and set the text property with the standard tag %%currentRecordIndex%%. So far all is ok. The small problem is that the numbers larger than 1000 are shown with a dot or comma thousand delimiter according to the locale. I would like instead to have them shown just as numbers, without any delimiter. I cannot change the locale or number format in Servoy because that would affect all numbers in the application.
I tried to put a script with the onRender event but with no effect because I can’t find an easy way to intercept the number generated by %%currentRecordIndex%%. I tried to use a calculation, but it doesn’t seem to do the trick either. What I don’t know is:
a) when the calculation is fired and is it possible to bind a calculation to an event, and how? If I add an “event” parameter to a calculation I get an error
b) how can I get the index number of a record without it being selected? The only way I know is through get selected index, but this implies that each record is first selected
c) can anyone tell me which could be a Javascript method to use instead of the tag %%currentRecordIndex%%?
[added on Aug 18]
While trying to understand the problem I noticed that the label Object ```
lbl
LABEL[name:lb_num,x:0,y:5,width:40,height:17,value: 1] {bgcolor:“#fefffe”,border:null,enabled:true,fgcolor:“#000000”,font:“Helvetica,0,11”,format:null,getAbsoluteFormLocationY:Function,getBgcolor:Function,getBorder:Function,getClientProperty:Function,getDataProviderID:Function,getDesignTimeProperty:Function,getElementType:Function,getFgcolor:Function,getFont:Function,getFormat:Function,getHeight:Function,getImageURL:Function,getLabelForElementName:Function,getLocationX:Function,getLocationY:Function,getMnemonic:Function,getName:Function,getParameterValue:Function,getRolloverImageURL:Function,getThumbnailJPGImage:Function,getToolTipText:Function,getWidth:Function,imageURL:null,isEnabled:Function,isTransparent:Function,isVisible:Function,mnemonic:“”,putClientProperty:Function,rolloverImageURL:null,setBgcolor:Function,setBorder:Function,setEnabled:Function,setFgcolor:Function,setFont:Function,setFormat:Function,setImageURL:Function,setLocation:Function,setMnemonic:Function,setRolloverImageURL:Function,setSize:Function,setToolTipText:Function,setTransparent:Function,setVisible:Function,toolTipText:null,transparent:false,visible:true}
Most of these properties can be accessed by a function e.g. ```
var nm = lbl.getName(); //returns "lbl_num"
``` or directly```
var color = lbl.bgcolor; //returns "#fefffe"
``` But there is apparently no way of getting the "value" property. Any suggestion?
Thank you for any help.