# Problem with read data from DataSet

**URL:** <https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286>\
**Category:** Ignition\
**Created:** [December 8, 2020, 8:13am UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286 "2020-12-08T08:13:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [December 8, 2020, 8:13am UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/1 "2020-12-08T08:13:03Z")

</div>

Hello, I have a problem with reading data from the dataset. You can look at to image with error and my code and say me what I do wrong?  
Thank you

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

```auto
	if 'A' in self.getSibling("Label_1").props.text :
			self.getSibling("Label_2").props.text = self.view.params.viewAdapt.getValueAt(0,"Umístění")

```

And data in dataset

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/08f4cba7c10bd18f304affa3a85d7e54034d9415.png)

Thank you

---

<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:** [December 8, 2020, 1:32pm UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/2 "2020-12-08T13:32:47Z")

</div>

You have accents on “Umístění” in your code, but there are no accents on the column name in the dataset. Since other columns do have names with accents, I don’t think it is a failure in Ignition.

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [December 8, 2020, 1:47pm UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/3 "2020-12-08T13:47:20Z")

</div>

Yes, but how I can solve this problem. Can I read the data differently?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 8, 2020, 1:55pm UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/4 "2020-12-08T13:55:50Z")

</div>

I believe .getValueAt() also accepts the number of the column, so you can do `self.view.params.viewAdapt.getValueAt(0,8)`

If you have some hidden columns it will be a different number from 8 thought.

---

<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:** [December 8, 2020, 1:57pm UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/5 "2020-12-08T13:57:47Z")

</div>

> [@etlikmilos](#):
>
> Can I read the data differently?

That's depends on how you read it now. You haven't told us what mechanism in Ignition created the dataset. If a simple DB query, then your DB is probably responsible.

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [December 9, 2020, 5:20am UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/6 "2020-12-09T05:20:43Z")

</div>

Hello my DataSet are from SQL query.

```auto
SELECT adapter.barcode AS [Čárový_kód_adapter],
	adapter.name AS Název,
	adapter.forMachine AS [Pro_stroje],
	adapter.numberSqueeze AS Otisků,
	adapter.avergeFrom AS [Průměr_OD],
	adapter.averageTo AS [Průměr_DO],  
	adapter.[rt] AS [3RT],  
	adapter.coldCanal AS [Studený_kanál], 
	adapter.location AS Umístění , 
	adapter.ID_adapt AS [Adapter ID] ,
	reject.barcode_reject AS [Čárový_kód_vybijeni],
	loadGrip.barcode_loadgrip AS [Čárový_kód_nabijení] , 
	machine.barcode_machine AS [Čárový_kód_stroj] ,
 	loadGrip.location_loadgrip AS [Umístění nabíjení],
 	reject.location_reject AS [Umístění vybijení] ,  
	machine.name AS Stroj,  
	reject2.barcode_reject AS[Čarový kod vybijeni], 
	reject2.location_reject AS [Umísteni], 
 	reject2.numberSqueeze AS [Počet otisků]   
FROM adapter 

LEFT JOIN loadGrip 
ON [adapter]. ID_adapt = loadGrip.loadID 
LEFT JOIN machine 
ON [adapter]. ID_adapt = machine.machinejID 
LEFT JOIN reject  
ON [adapter]. ID_adapt = reject.rejectID 

LEFT JOIN reject2  
ON [adapter]. ID_adapt = reject2.rejectID 
WHERE adapter.barcode = :barcod 

```

Thank you

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [December 9, 2020, 5:32am UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/7 "2020-12-09T05:32:13Z")

</div>

If i use viewAdapt.getValuAt(0,8) I get error :

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/0/10b98f91e951eacb74d2b46ae9ec9c5e0999dde6.png)

---

<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:** [December 9, 2020, 12:19pm UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/8 "2020-12-09T12:19:06Z")

</div>

> [@etlikmilos](#):
>
> Umísteni

This is in the dataset.

> [@etlikmilos](#):
>
> Umístění

This is in your jython. Different accents.

---

<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:** [December 9, 2020, 12:25pm UTC](https://forum.inductiveautomation.com/t/problem-with-read-data-from-dataset/41286/9 "2020-12-09T12:25:53Z")

</div>

Make sure any string references in your Jython code use the unicode string marker as well.

This:

> [@etlikmilos](#):
>
> self.view.params.viewAdapt.getValueAt(0,"Umístění")

Should be:

```auto
self.view.params.viewAdapt.getValueAt(0, u"Umístění")

```

(and also have all the correct accent marks if necessary, I'm not really following along)
