# FolderItem.ChildAt(Index…) Index not defined…

**URL:** <https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428>\
**Category:** Bugs and Feature Requests\
**Created:** [July 7, 2023, 10:37am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428 "2023-07-07T10:37:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 7, 2023, 10:37am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/1 "2023-07-07T10:37:08Z")

</div>

In the documentation [FolderItem.ChildAt()](https://documentation.xojo.com/api/files/folderitem.html#folderitem-childat), the Index parameter is not defined (start value, etc.).

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [July 8, 2023, 8:20am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/2 "2023-07-08T08:20:25Z")

</div>

FolderItem.Count ?

```auto
Var folderItemsCount As Integer = FolderItem.Count
Var lastIndex As Integer = (folderItemsCount - 1)

For i As integer = 0 To lastIndex
Var f As folderItem = parentFolder.ChildAt(i) 
Next

```

Something like that…

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 8, 2023, 9:16am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/3 "2023-07-08T09:16:00Z")

</div>

> [@DerkJ](#):
>
> Something like that…

So the Index value starts at zero ?

That is not in the Documentation.

Nor what you get if you pass an Out Of Bounds value…

The documentation does not say you can get invisible files using that Method.

Sort of…

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [July 8, 2023, 9:18am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/4 "2023-07-08T09:18:41Z")

</div>

you expect it to start at 10 ? or any random value ?  
You can however create an issue for the documentation to be updated, but that’s something different than your question was.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 8, 2023, 9:22am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/5 "2023-07-08T09:22:05Z")

</div>

> [@DerkJ](#):
>
> you expect it to start at 10 ? or any random value ?

No. I only said that parameter is not discussed enough.

And that was not a question.

At last, think Newbie. This is a question (s)he will get, eventually look at the documentation in vain.

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [July 8, 2023, 9:24am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/6 "2023-07-08T09:24:12Z")

</div>

Not sure where this would go. Just create an fb case for xojo to add first, last indexes to the documentation and/or add FolderItem.FirstIndex and FolderItem.lastIndex  
That would sort this topic out.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 8, 2023, 9:25am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/7 "2023-07-08T09:25:20Z")

</div>

There is already (sort of) one:

[https://tracker.xojo.com/xojoinc/xojo/-/issues/73290](https://tracker.xojo.com/xojoinc/xojo/-/issues/73290)

Did you noticed the channel name this appears on ?

---

<div class="post-metadata">

**Author:** ![Greg\_O](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o/32/22785_2.png) [@Greg\_O](https://forum.xojo.com/u/Greg_O)\
**Post date:** [July 8, 2023, 11:00am UTC](https://forum.xojo.com/t/folderitem-childat-index-index-not-defined/76428/8 "2023-07-08T11:00:30Z")

</div>

> [@Emile\_Schwarz](#):
>
> Did you noticed the channel name this appears on ?

Putting it on this channel is not the same as filing a bug report. It’s just a place to evangelize things to get a case more attention.
