# Picking string out of dataset based on the value that is bound to it. not by selecting the row

**URL:** <https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451>\
**Category:** Ignition\
**Created:** [October 13, 2023, 2:14pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451 "2023-10-13T14:14:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 2:14pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/1 "2023-10-13T14:14:41Z")

</div>

hello,

I trying to get a string out of my dataset based on the value that is in the same row as the string not by selecting a row number. I want to do this with the value instead of the row number because I have a tag that gives the number of the string that must be shown. The numbers and the row numbers aren't equal., so I cannot put this code:  
`{[client]operatorTextlist[0,1]}  
into a custom property and use an indirect tag for pointing the row with the tag that is giving te value of what kinda string it has to pass because they are not in correct order. So does someone has a solution?  
I have tried to do this in expression.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 13, 2023, 2:20pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/2 "2023-10-13T14:20:20Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/lookup](https://docs.inductiveautomation.com/display/DOC81/lookup)

something like  
`lookup({dataset_tag}, {number_tag}, 'default value', 'the column where number is', 'the column where the string is')`

I did tell you 2 or 3 times to use `lookup` in your other thread.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 2:22pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/3 "2023-10-13T14:22:48Z")

</div>

yeah I know but that is not working  
it is returning the value and not the string

---

<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:** [October 13, 2023, 2:24pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/4 "2023-10-13T14:24:50Z")

</div>

> [@Stef\_Velers](#):
>
> not working

Show your dataset and show the expression that isn't working. We aren't mind-readers.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 2:30pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/5 "2023-10-13T14:30:37Z")

</div>

expression:  
`lookup({[client]operatorTextlist}, "Value", 2, "Text")`  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e11778eb48e9786f00c8ce90735b626e6d48df6f.png)  
I want to show the string that is at value 2

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 13, 2023, 2:31pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/6 "2023-10-13T14:31:46Z")

</div>

`lookup({[client]operatorTextlist}, 2, "not found", "Value", "Text")`

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 2:33pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/7 "2023-10-13T14:33:36Z")

</div>

> [@pascal.fragnoud](#):
>
> lookup({[client]operatorTextlist}, "not found", 2, "value", "Text")

that did the trick

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 13, 2023, 2:34pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/8 "2023-10-13T14:34:52Z")

</div>

I updated it, try the new one

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [October 13, 2023, 2:35pm UTC](https://forum.inductiveautomation.com/t/picking-string-out-of-dataset-based-on-the-value-that-is-bound-to-it-not-by-selecting-the-row/80451/9 "2023-10-13T14:35:40Z")

</div>

yes it works, sorry for the many questions but I'm new to this so I'm trying everything so sorry for that.
