# Script Vision: How to put 2 Parameters in a Tag Path

**URL:** <https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964>\
**Category:** Ignition\
**Tags:** ignition81, scripting, vision\
**Created:** [March 7, 2024, 12:52pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964 "2024-03-07T12:52:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbautomation](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@nbautomation](https://forum.inductiveautomation.com/u/nbautomation)\
**Post date:** [March 7, 2024, 12:52pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/1 "2024-03-07T12:52:23Z")

</div>

Hi, I have a basic question, I need to put two parameters inside a tag path but I don't know how code it.

I've done this with 'indirect Tag':

```
` [default]Folder1/tank{1}_{2}/high_level`

```

Where  
1 and 2: Are tags of custom properties and I did'nt have any problem.

But when I trying to emulate it on a script with 2 parameters, It does not work.

First I do in on Script: get the parameter from the root container

```auto
param1 = event.source.parent.parameter1
param2 = event.source.parent.parameter2

```

Second: put the tagPath  
`tagPath = "[default]Folder1/tank%i_%i/high_level" %param1 %param2`

Note: Both Parameters are integers

The error say:  
`TypeError: not enough arguments for format string`

Is possible put more than one parameter in a script tagPath?  
what would be its format?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [March 7, 2024, 1:01pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/2 "2024-03-07T13:01:55Z")

</div>

`tagPath = "[default]Folder1/tank%i_%i/high_level" % (param1, param2)`

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 7, 2024, 1:25pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/3 "2024-03-07T13:25:02Z")

</div>

To clarify: This isn't an "Ignition" thing, but simply how python's "string interpolation" operator works. Multiple items must be supplied as a tuple. (Or, in certain uses, as a dictionary.)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 7, 2024, 3:28pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/4 "2024-03-07T15:28:44Z")

</div>

See also:  
[https://pyformat.info/](https://pyformat.info/)

---

<div class="post-metadata">

**Author:** ![Dorian\_Leonard](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@Dorian\_Leonard](https://forum.inductiveautomation.com/u/Dorian_Leonard)\
**Post date:** [March 11, 2024, 10:41am UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/5 "2024-03-11T10:41:23Z")

</div>

Hi, I was wondering if it was possible to do the same with a binding on a text. I've tried, it doesn't seems to work, I might have missed something...  
( Should I start a new topic ?)

---

<div class="post-metadata">

**Author:** ![leonardo.godoi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/leonardo.godoi/32/27178_2.png) [@leonardo.godoi](https://forum.inductiveautomation.com/u/leonardo.godoi)\
**Post date:** [March 11, 2024, 11:37am UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/6 "2024-03-11T11:37:03Z")

</div>

Depends on what you're using but take a look at indirect tag bindings for either Perspective or Vision. If that's not what you need try to make your own topic and give us more info on what you're trying to do and what you've tried that failed.  
Here's Vision:

> **[Indirect Tag Bindings in Vision | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/vision/binding-types-in-vision/indirect-tag-bindings-in-vision)**
>
> Binding Properties to a Dynamic Set of Tags

And here's Perspective:

> **[Tag Bindings in Perspective | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/bindings-in-perspective/tag-bindings-in-perspective#indirect-tag-binding-mode)**
>
> A Tag binding is a straight-forward binding type. It simply binds a property directly to a Tag Property (typically the value). This sets up a subscription for that Tag. Every time the chosen Tag changes, the binding is evaluated and pushes the new...

---

<div class="post-metadata">

**Author:** ![Dorian\_Leonard](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@Dorian\_Leonard](https://forum.inductiveautomation.com/u/Dorian_Leonard)\
**Post date:** [March 11, 2024, 12:45pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/7 "2024-03-11T12:45:32Z")

</div>

Allright, it's all good, I was just looking the wrong way for this problem... But stil, thank you for your help.

(I'm on perspective and I was trying to use a params in a tagPath while using "Expression" thinking that it was the go to for that situation but actually the indirect tag binding is literally for that purpose)

---

<div class="post-metadata">

**Author:** ![nbautomation](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@nbautomation](https://forum.inductiveautomation.com/u/nbautomation)\
**Post date:** [March 11, 2024, 1:02pm UTC](https://forum.inductiveautomation.com/t/script-vision-how-to-put-2-parameters-in-a-tag-path/86964/8 "2024-03-11T13:02:15Z")

</div>

If you explain exactly what do you want to do, It will be easier for us help you
