# To bring the dataset values under the instances created

**URL:** <https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 23, 2023, 10:30am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060 "2023-05-23T10:30:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 23, 2023, 10:30am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/1 "2023-05-23T10:30:52Z")

</div>

How to bring the dataset values under the instances created, ..so that it will get updated automatically as in the dataset, for each element

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/3/6334bb4388ffb70476e3997c2729d3e2338c5e3e.png)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 23, 2023, 10:35am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/2 "2023-05-23T10:35:38Z")

</div>

If I am reading this correctly, I think the [lookup expression](https://docs.inductiveautomation.com/display/DOC81/lookup) is what you are looking for.

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 23, 2023, 11:11am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/3 "2023-05-23T11:11:20Z")

</div>

![MicrosoftTeams-image (6)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/5/b5c00a5c01d9f56ca72c2aec3580ed9075ce4ee6.png)

If I type the serial number in text field, we get the required data set (tester name, pass fail status - columns) with the help of named query..Now, if i want any particular row (tester name and status) to get reflected in the instances which i have created , what should be done?...

It should be like whenever the serial number is typed, as how it's automatically updating the data set , it should update in all the ten instances also..how can the binding be done ?

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 23, 2023, 11:16am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/4 "2023-05-23T11:16:15Z")

</div>

I binding at the **instances** property, and create all the json by script.  
I copied one instance as a demo, and modify it then put it in a list, return the list at the end.

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 24, 2023, 7:40am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/5 "2023-05-24T07:40:14Z")

</div>

It should be like whenever the serial number is typed, as how it's automatically updating the data set , it should update in all the ten instances also..how can the binding be done ? as in the above pics

---

<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:** [May 24, 2023, 8:05am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/6 "2023-05-24T08:05:12Z")

</div>

The answer has already been given...

Bind the `instances` property to the dataset, then add this script transform:

```python
return [
	{
		'testerName': row['TESTERNAME'],
		'status': row['PASSFAILSTATUS']
	} for row in system.dataset.toPyDataSet(value)
]

```

Or change the repeated view's parameters to match the dataset column names, and you don't even need a transform anymore ! (I think the flex repeater's instances accept datasets)

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 24, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/7 "2023-05-24T15:25:27Z")

</div>

Yes, this worked for each instance when I changed the repeater view's parameter...But how to make the serial number search in one view and it should automatically update the data set in all the instances in another view respective of their TESTERNAME and PASSFAILSTATUS in each instance for that how can the binding be done?  
In my project, here I need to type the serial number 👇

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a951b9cd87263bcea00fe6f19025cdb0495ef898.png)

In another view like this, their respective TESTERNAME and PASSFAILSTATUS should appear..

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6649f872af8a674df95c1a4d841d1503681a205.png)  
@pascal.fragnoud

---

<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:** [May 24, 2023, 3:28pm UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/8 "2023-05-24T15:28:54Z")

</div>

Well, bind the instances property to the thing that changes... and it will be reevaluated each time it changes.

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 24, 2023, 3:41pm UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/9 "2023-05-24T15:41:02Z")

</div>

It shows null

---

<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:** [May 24, 2023, 3:49pm UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/10 "2023-05-24T15:49:20Z")

</div>

You're binding a query that returns a full dataset to a text field that expects a string. We already went over this. You NEED to read the doc and go through the inductive university, this is very basic stuff.

I'll try to make things simple, based on a few assumptions:

- You have a table that is updated by a query, based on the value of a textfield.
- You have a flex repeater that you want to update, based on that same textfield
- solution1: apply the same logic to your repeater's instances property that you applied to your table
- solution2: bind the repeater's instances property to the table's data property.

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 25, 2023, 12:01am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/11 "2023-05-25T00:01:47Z")

</div>

In ignition, everything is an object, which is a bit strange and unfamiliar to automation engineers. But if you know a modern programming language like python, they're all objects, they're of a type, they have properties, they're instances. Just like charging a mobile phone, which mobile phone and what interface. Once you understand this, it's easy to shape the functionality you want, even very complex ones.

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 25, 2023, 7:57am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/12 "2023-05-25T07:57:05Z")

</div>

This is what it comes when I apply table logic to the instances property

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a9763c18f8d3d199c219deda7581a69b2a223620.png)

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 25, 2023, 8:13am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/13 "2023-05-25T08:13:00Z")

</div>

Show your code. What's the error info? Did you bind to a namequery which need long time?

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 25, 2023, 8:17am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/14 "2023-05-25T08:17:24Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/e/ce73d4d360df089d052ceee762659cfff2bccc67.png)  
SELECT TESTERNAME, PASSFAILSTATUS  
FROM UT\_INTELLIPAK.FPYDPUVIEW  
WHERE dbid IN (SELECT DISTINCT dbid  
FROM UT\_INTELLIPAK.uutinfo  
WHERE value = 'C18L08684')

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 25, 2023, 8:26am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/15 "2023-05-25T08:26:03Z")

</div>

You could notice the error is occured on the Query. Because you didn't bind the **Value**. You can compare it with your previous screenshot.  
After that, the outcome of query, is **Dataset** , and the instances property, need to bind to a list(or array, whatever).

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 25, 2023, 8:35am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/16 "2023-05-25T08:35:05Z")

</div>

The value which I binded is this correct from session custom and its key name?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b74974fe6ee64129f5db86a70ef918dce23c4d2d.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f9ed4646ecc16395a2aced53cb5e3e3698361282.png)

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [May 25, 2023, 8:47am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/17 "2023-05-25T08:47:48Z")

</div>

Actually, it could be anything,but empty. You do not even use it in your query.  
You specify the value target in the query, which is very unnormal. Are you still testing your feature?  
Here is a simple demo of my project.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c79d6f6480d34dc14b6bcf5b425f1f2b39618c70.png)  
You may have to figure out how your function is implemented first. What are the conditions and outcomes of each step.

---

<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:** [May 25, 2023, 9:26am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/18 "2023-05-25T09:26:52Z")

</div>

Again,

> [@pascal.fragnoud](#):
>
> We already went over this. You NEED to read the doc and go through the inductive university, this is very basic stuff

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 25, 2023, 9:41am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/19 "2023-05-25T09:41:27Z")

</div>

Your named query has a parameter that doesn't seem to be used in the query itself? You've set the serial number condition in the where clause to a fixed value; shouldn't this use the parameter?  
But as with Pascal, and I've said before, learn ignition via the university first, then come back here with questions once you somewhat understand the fundamentals

---

<div class="post-metadata">

**Author:** ![Chowmya\_C](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@Chowmya\_C](https://forum.inductiveautomation.com/u/Chowmya_C)\
**Post date:** [May 25, 2023, 10:11am UTC](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060/20 "2023-05-25T10:11:09Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/2/f239c60cdc598a8bd73cd737d7163a75246c7902.png)  
Is this correct one ?

[Next page](https://forum.inductiveautomation.com/t/to-bring-the-dataset-values-under-the-instances-created/74060.md?page=2)
