# Doubts about expressions

**URL:** <https://forum.inductiveautomation.com/t/doubts-about-expressions/30097>\
**Category:** Ignition\
**Created:** [November 19, 2019, 10:05pm UTC](https://forum.inductiveautomation.com/t/doubts-about-expressions/30097 "2019-11-19T22:05:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![felipe2010silva](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@felipe2010silva](https://forum.inductiveautomation.com/u/felipe2010silva)\
**Post date:** [November 19, 2019, 10:05pm UTC](https://forum.inductiveautomation.com/t/doubts-about-expressions/30097/1 "2019-11-19T22:05:27Z")

</div>

Good night. I’m new to ignition and have had some doubts about ignition project programming at the company I work for. I would like someone to give me just some idea of ​​the line of code that I will share below.

```auto
if Execute == 1:
		myNameLow = system.tag.read("[.]zMyNameLow")
		myMachineNameLow = system.tag.read("[.]../zMyNameLow")
		historyPath = "machines_dm/%s/%s" % (myMachineNameLow.value,myNameLow.value)

```

My question is about this line:  
`machines_dm/%s/%s" %`  
I know that machines\_DM is a folder that contains all the tags of plant machines. but an expression /% s /% s% could not understand.

```auto
SecondValue = currentValue.value

	Execute = 0
	if SecondValue == 0: Execute = 0
	if SecondValue == 10: Execute = 0
	if SecondValue == 20: Execute = 0
	if SecondValue == 30: Execute = 0
	if SecondValue == 40: Execute = 1
	if SecondValue == 50: Execute = 0
	if initialChange == 1: Execute = 0
	
	if Execute == 1:
		myname = system.tag.read("[.]zMyName")
		logger = system.util.getLogger(myname.value)
		#get my rated speeds from parameter data.
		Path = system.tag.read("[.]zMyRatedSpeedLookupPath")
		Path2 = "[~]%s" % (Path.value)
		Dataset = system.tag.read(Path2)
		#write dataset into our own tag
		system.tag.write("[.]zRatedSpeeds",Dataset)

```

and the second doubt is in the expression:  
Path2 = “[~]%s” % (Path.value)

I didn’t understand what that row.

thanks!!!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 19, 2019, 10:07pm UTC](https://forum.inductiveautomation.com/t/doubts-about-expressions/30097/2 "2019-11-19T22:07:21Z")

</div>

This is just Python string formatting syntax.

[https://www.learnpython.org/en/String\_Formatting](https://www.learnpython.org/en/String_Formatting)

---

<div class="post-metadata">

**Author:** ![felipe2010silva](https://avatars.discourse-cdn.com/v4/letter/f/54ee81/32.png) [@felipe2010silva](https://forum.inductiveautomation.com/u/felipe2010silva)\
**Post date:** [November 20, 2019, 2:16am UTC](https://forum.inductiveautomation.com/t/doubts-about-expressions/30097/3 "2019-11-20T02:16:32Z")

</div>

Thankful!!!
