# getTotalAvailableSize broken on Browse object in 8.1.20?

**URL:** <https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [September 6, 2022, 8:54pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803 "2022-09-06T20:54:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [September 6, 2022, 8:54pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/1 "2022-09-06T20:54:44Z")

</div>

Just upgraded one of my systems to 8.1.20 and some of our scripts that use `system.tag.browse` started misbehaving. Narrowed it down to this snippet:

```auto
tag_root = '[default]TopFolder'
browse_results = system.tag.browse(tag_root, {'recursive':True})
partial_results = (browse_results.getReturnedSize() != browse_results.getTotalAvailableSize())

```

Some quick testing in the Designer script console is showing that `getTotalAvailableSize` is always returning 0, even when we got results.

Is the concept of partial results deprecated, or is this a regression bug?

---

<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:** [September 6, 2022, 9:23pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/2 "2022-09-06T21:23:54Z")

</div>

I think this might be a regression introduced in the Tag Status Report Tool work… let me ask around.

---

<div class="post-metadata">

**Author:** ![mrojas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrojas/32/6394_2.png) [@mrojas](https://forum.inductiveautomation.com/u/mrojas)\
**Post date:** [September 6, 2022, 9:45pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/3 "2022-09-06T21:45:06Z")

</div>

What version did you upgrade from?

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [September 7, 2022, 1:51pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/4 "2022-09-07T13:51:58Z")

</div>

I was coming from 8.1.17.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [September 19, 2022, 7:55pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/5 "2022-09-19T19:55:04Z")

</div>

Any comment on whether this is a real bug or if something else was going on?

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 10, 2022, 8:22pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/6 "2022-10-10T20:22:54Z")

</div>

Just upgraded to 8.1.21 and this issue still exists on that version.

---

<div class="post-metadata">

**Author:** ![Kevin\_Tulloch](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin_tulloch/32/39631_2.png) [@Kevin\_Tulloch](https://forum.inductiveautomation.com/u/Kevin_Tulloch)\
**Post date:** [October 18, 2022, 4:56pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/7 "2022-10-18T16:56:40Z")

</div>

Hi [justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski),

I would recommend opening a ticket with the Support Department. This way you can get a direct update regarding the status/whether this indeed a bug.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 28, 2022, 5:34pm UTC](https://forum.inductiveautomation.com/t/gettotalavailablesize-broken-on-browse-object-in-8-1-20/63803/8 "2022-10-28T17:34:42Z")

</div>

I did open a support ticket and this was the final conclusion:

> There likely were some changes to the source code that lead to the change in the behavior as a result of adding the Tag Report Tool in 8.1.19.
> 
> However, it seems that in both cases the function is/was likely not returning the expected value at any point, even pre-8.1.19.
> 
> In general, the `getTotalAvailableSize` is more intended to be used with the `system.tag.query` function in general. With `.query` you can specify a limit (i.e. find the first 10 tags) which returns a continuation point (next tag that would have been checked), which then can be used to continue querying past the limit. `system.tag.browse` doesn't allow you to pass in a limit parameter, and is just going to return the entirety of the results every time. `getTotalAvailableSize` in theory would just return the same as `getReturnedSize` .
> 
> Should be noted that the function is also not returning anything particularly useful with `system.tag.query` as of right now either. The only reference I can find to it in the user manual is this brief snippet here which isn't very explicit, but we'll likely remove that reference as well [Scripting Object Reference - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Scripting+Object+Reference).
> 
> In short, It did change as a result of adding the Tag Report Tool in 8.1.19, but likely wasn't working the way you would expect it to or in a particularly useful way before then when used with `system.tag.browse`.
