# String Formatting (concatenation)

**URL:** <https://forum.inductiveautomation.com/t/string-formatting-concatenation/8708>\
**Category:** Ignition\
**Created:** [July 10, 2014, 7:09pm UTC](https://forum.inductiveautomation.com/t/string-formatting-concatenation/8708 "2014-07-10T19:09:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmonter](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jmonter](https://forum.inductiveautomation.com/u/jmonter)\
**Post date:** [July 10, 2014, 7:09pm UTC](https://forum.inductiveautomation.com/t/string-formatting-concatenation/8708/1 "2014-07-10T19:09:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![adamaustin](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@adamaustin](https://forum.inductiveautomation.com/u/adamaustin)\
**Post date:** [July 10, 2014, 7:25pm UTC](https://forum.inductiveautomation.com/t/string-formatting-concatenation/8708/2 "2014-07-10T19:25:19Z")

</div>

Python is case-sensitive. Make sure all of your variable names have lower-case letters.

---

<div class="post-metadata">

**Author:** ![jmonter](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jmonter](https://forum.inductiveautomation.com/u/jmonter)\
**Post date:** [July 10, 2014, 7:27pm UTC](https://forum.inductiveautomation.com/t/string-formatting-concatenation/8708/3 "2014-07-10T19:27:14Z")

</div>

Thanks,  
I been staring at the code and did not notice the upper case V.
