# String Array limited to 240 array items?

**URL:** <https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452>\
**Category:** Ignition\
**Created:** [April 1, 2016, 8:34pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452 "2016-04-01T20:34:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [April 1, 2016, 8:34pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452/1 "2016-04-01T20:34:57Z")

</div>

I have just started testing the use of tags of data type: String Array

I am using 7.8.1

I have not found much documentation of this data type, but based on testing it seems there is a limit to 240 array items. Is this true?

Also, I was testing reading tag values from the string array tag using the Script Console and ran into a problem reading more than 10 items. Any ideas what I’m doing wrong?

This works fine:

```auto
print system.tag.read("ecospeccc/channelset/preliminary/spectra/spectra_0_/detectorspectrum/spectrum/spectrumcompressed/spectrumcompressed[9]")
```

Returns:

```auto
[29, Good, Fri Apr 01 16:01:44 EDT 2016]
```

But this:

```auto
print system.tag.read("ecospeccc/channelset/preliminary/spectra/spectra_0_/detectorspectrum/spectrum/spectrumcompressed/spectrumcompressed[10]")
```

Returns:

`Traceback (most recent call last):
  File "<buffer>", line 1, in <module>
ValueError: com.google.common.collect.ComputationException: com.inductiveautomation.ignition.common.sqltags.parser.TagPathFormatException: Illegal character '[' (Line 1 , Char 116)`

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [April 1, 2016, 9:08pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452/2 "2016-04-01T21:08:56Z")

</div>

Hi,

There were some issues with arrays fixed for 7.8.2. I just tried creating and reading an array of 1000 strings and didn’t have a problem. If you can upgrade, I would give that a shot.

Regards,

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [April 1, 2016, 10:31pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452/3 "2016-04-01T22:31:37Z")

</div>

Thank you Colby.

One more question about storage of string array tags to the historian table(s). It was mentioned that if a string array tag is marked for history that only the first string item is stored in the historian table? In a quick test it does appear to be true.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [April 4, 2016, 3:32pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452/4 "2016-04-04T15:32:36Z")

</div>

I believe that was also fixed for 7.8.2. History settings an an array tag should get applied to every element.

Regards,

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [April 5, 2016, 4:48pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452/5 "2016-04-05T16:48:33Z")

</div>

After upgrading to 7.8.2 I am now getting over 1400 string items in the array.

Are there any example of how to retrieve the individual string items from history?

Can I use system.tag.queryTagHistory as shown below to get a dataset of all the values in the array? Or do I need to specifically use the call separately with ‘myStringArray[0]’, ‘myString Array[2]’, and so on… which would not be good for large arrays.

Also are there any specifics for accessing the values once you have the dataset?

`import datetime
startTime = datetime.datetime.now() - datetime.timedelta(minutes=5)
endTime = datetime.datetime.now()
dataSet = system.tag.queryTagHistory(paths=['myStringArray'], startDate=startTime, endDate=endTime, returnSize=1, aggregationMode="Maximum", returnFormat='Wide')`

---

<div class="post-metadata">

**Author:** ![Bob](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bob/32/16899_2.png) [@Bob](https://forum.inductiveautomation.com/u/Bob)\
**Post date:** [April 5, 2016, 5:47pm UTC](https://forum.inductiveautomation.com/t/string-array-limited-to-240-array-items/11452/6 "2016-04-05T17:47:10Z")

</div>

Sorry, realizing that my quick copy/paste code example above isn’t very good for string array and getting all items.

I am now actually testing with this code where spectrumCompressed has been tried as both a string array and an integer array because the strings actually just represent integers:

[code]import datetime  
startTime = datetime.datetime.now() - datetime.timedelta(minutes=5)  
endTime = datetime.datetime.now()  
dataSet = system.tag.queryTagHistory(paths=[‘spectrumCompressed’], startDate=startTime, endDate=endTime, returnSize=1200, returnFormat=‘Wide’)

print dataSet.getValueAt(0,0)[/code]

When I try various elements of the array (whether as string array type or integer array type) the first item (ie. print dataSet.getValueAt(0,0), or print dataSet.getValueAt(1,0), or print dataSet.getValueAt(2,0)…) always returns a proper timestamp. However the second item (ie. print dataSet.getValueAt(0,1), or print dataSet.getValueAt(1,1), or print dataSet.getValueAt(2,1)…) always returns “None”. I can see in the designer that these individual items are getting actual non-zero integer values (or integers as strings).

Trying to understand why I am getting the “None” values. Perhaps the actual values are not being stored?

My Historical Scan class is set to “Evaluate on Change”
