TOPIC: Number format not working with a number
#275
Number format not working with a number 4 Years, 1 Month ago
Hello,
Code:


Controller
 {
 Controls:(Params
QueryFormat
{
Query()
{
.snum = 0
return 'tables'
}
Output:false
AfterOutput(data)
{
.snum += 1
return  Object('Number' .snum)
}
}
)
}


This returns an error - "strings subscripts must be numbers". If return Object('Number' value:.snum) is used in the AfterOutput mehod, then the whole record is output. If Display(.snum) is used in place of .snum (without value:) in the AfterOutput method, everything runs smoothly. What is the reaosn for this unexpecte behaviour?

ajith
 
 
#278
Re:Number format not working with a number 4 Years, 1 Month ago
Try:

Object('Number', .snum)

i.e. with a comma

Without the comma it is interpreted as:

'Number'.snum
 
 
andrew
 
#287
Re:Number format not working with a number 4 Years, 1 Month ago
Thanks!
ajith