value1 = event.source.parent.getComponent(‘GroupName’).text
value2 = event.source.parent.getComponent(‘Spinner’).intValue
value3 = numberFormat(value2, 0000)
#idNumber = system.db.runScalarQuery(“SELECT MAX(store) + 1 FROM shipping_stores”)
system.db.runUpdateQuery(“INSERT INTO shipping_stores (store) VALUES (’%s’)” % (value3), ‘Sample’)
system.db.runUpdateQuery(“UPDATE shipping_stores SET groupname = ‘%s’ WHERE store = ‘%s’”% (value1, value3), ‘Sample’)
Here is a script that works fine for value 2, but I am inserting an int value that needs formating.
I keep getting an error saying that numberFormat does not exist.
What should I use to format my int to a 4 digit value?