# Help With Scripting

**URL:** <https://forum.inductiveautomation.com/t/help-with-scripting/40300>\
**Category:** Ignition Early Access\
**Created:** [November 4, 2020, 4:34pm UTC](https://forum.inductiveautomation.com/t/help-with-scripting/40300 "2020-11-04T16:34:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![awallace](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awallace/32/19250_2.png) [@awallace](https://forum.inductiveautomation.com/u/awallace)\
**Post date:** [November 4, 2020, 4:34pm UTC](https://forum.inductiveautomation.com/t/help-with-scripting/40300/1 "2020-11-04T16:34:59Z")

</div>

How do we edit below script to include a third tag battery, for example /PLC/5155-Battery voltage

```
tag='/PLC/5070-Battery Voltage'
tagPath = tagProv+location+tag

if system.tag.exists(tagPath):
	self.position.display = 1
	return tagPath
else:
	tagPath = tagProv+location+'/PLC/5059-Battery Voltage'
	if system.tag.exists(tagPath):
		self.position.display = 1
		return tagPath
	else:
		self.position.display = 0
		return ''''

```

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [November 4, 2020, 5:07pm UTC](https://forum.inductiveautomation.com/t/help-with-scripting/40300/2 "2020-11-04T17:07:04Z")

</div>

```auto
tagPath1 = tagProv+location+'/PLC/5070-Battery Voltage'
tagPath2 = tagProv+location+'/PLC/5059-Battery Voltage'
tagPath3 = tagProv+location+'/PLC/5155-Battery voltage'

if system.tag.exists(tagPath1):
	self.position.display = 1
	return tagPath1
elif system.tag.exists(tagPath2):
	self.position.display = 1
	return tagPath2
elif system.tag.exists(tagPath3):
	self.position.display = 1
	return tagPath3
else:
	self.position.display = 0
	return ''''

```

---

<div class="post-metadata">

**Author:** ![awallace](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awallace/32/19250_2.png) [@awallace](https://forum.inductiveautomation.com/u/awallace)\
**Post date:** [November 4, 2020, 5:14pm UTC](https://forum.inductiveautomation.com/t/help-with-scripting/40300/3 "2020-11-04T17:14:44Z")

</div>

Thank you for your help
