# Parameterize lookup function

**URL:** <https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017>\
**Category:** General Discussion\
**Tags:** ignition81\
**Created:** [July 10, 2024, 2:53pm UTC](https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017 "2024-07-10T14:53:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anant\_Upadhyayula](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Anant\_Upadhyayula](https://forum.inductiveautomation.com/u/Anant_Upadhyayula)\
**Post date:** [July 10, 2024, 2:53pm UTC](https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017/1 "2024-07-10T14:53:36Z")

</div>

![Expression](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/0/c0aebf84696f3c0e8ceadc3f878b304fd690784a.png)  
Is it possible to parameterize the path to the lookup data. I am not sure if it is path or the dataset. When I change the word hold in the path to a parameter, everything after the parameter is changed to regular text and resulting in expression error.  
I tried putting the whole path in a tostr() that also did not work. Any suggestions on what I am doing wrong?

---

<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:** [July 10, 2024, 2:57pm UTC](https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017/2 "2024-07-10T14:57:41Z")

</div>

You will need to use the `tag()` expression function to perform that kind of indirection inside an expression tag. (It is the only situation where you should use the `tag()` expression function.)

---

<div class="post-metadata">

**Author:** ![Anant\_Upadhyayula](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Anant\_Upadhyayula](https://forum.inductiveautomation.com/u/Anant_Upadhyayula)\
**Post date:** [July 10, 2024, 3:14pm UTC](https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017/3 "2024-07-10T15:14:31Z")

</div>

![Deff](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/4/3407db6c4e34e1ede8c19586af16035fa52c9240.png)  
@pturmel - can't figure out what am i doing wrong

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [July 10, 2024, 3:17pm UTC](https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017/4 "2024-07-10T15:17:56Z")

</div>

You need to construct the tag path with strings and the parameter.

So something like this:

```python
tag(concat('[~]_MasterData/',{udtParTankType},'Tank_Data'))

```

---

<div class="post-metadata">

**Author:** ![Anant\_Upadhyayula](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Anant\_Upadhyayula](https://forum.inductiveautomation.com/u/Anant_Upadhyayula)\
**Post date:** [July 10, 2024, 3:23pm UTC](https://forum.inductiveautomation.com/t/parameterize-lookup-function/93017/5 "2024-07-10T15:23:40Z")

</div>

Awesome, thank you @bschroeder
