I’m having difficulties with the string formatting, I have a screen with varies entry fields some numeric other text. When trying to format (concatenate) a string to create an SQL insert statement I’m getting an error message.
Traceback (innermost last):
File “event:actionPerformed”, line 17, in ?
NameError: v7
Pointing to a variable v7 I can not figure for the life of me what the problem is.
– Bellow is a simple extract of the script –
v0 = event.source.parent.getComponent(‘intSchID’).intValue
v1 = event.source.parent.getComponent(‘intTimeInHR’).intValue
v2 = event.source.parent.getComponent(‘intWashHR’).intValue
v3 = event.source.parent.getComponent(‘intTemp’).intValue
v4 = event.source.parent.getComponent(‘intSolids’).intValue
v5 = event.source.parent.getComponent(‘flPH’).floatValue
v6 = event.source.parent.getComponent(‘txtOperator’).text
V7 = event.source.parent.getComponent(‘txtDriver’).text
V8 = event.source.parent.getComponent(‘txtLicense’).text
V9 = event.source.parent.getComponent(‘txtWeight’).text
V10 = event.source.parent.getComponent(‘txtWashTag’).text
V11 = event.source.parent.getComponent(‘txtWashDate’).text
v12 = event.source.parent.getComponent(‘txtWashLocation’).text
v13 = event.source.parent.getComponent(‘txtSealTag’).text
v14 = event.source.parent.getComponent(‘txtLabTech’).text
strSe = “Value (%i,%i,%i,%i,%i,%f,%s,%s,%s,%s,%s,%s,%s,%s,%s)” %(v0,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14)
print strSe