# UFM How to get the length of a blocklist array

**URL:** <https://forum.umbraco.com/t/ufm-how-to-get-the-length-of-a-blocklist-array/6711>\
**Category:** Questions\
**Tags:** v16\
**Created:** [November 19, 2025, 2:08pm UTC](https://forum.umbraco.com/t/ufm-how-to-get-the-length-of-a-blocklist-array/6711 "2025-11-19T14:08:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsoeteman](https://forum.umbraco.com/user_avatar/forum.umbraco.com/rsoeteman/32/296_2.png) [@rsoeteman](https://forum.umbraco.com/u/rsoeteman)\
**Post date:** [November 19, 2025, 2:08pm UTC](https://forum.umbraco.com/t/ufm-how-to-get-the-length-of-a-blocklist-array/6711/1 "2025-11-19T14:08:58Z")

</div>

Hi,

Using Umbraco v16.3 and try to display the amount of childblocks in a label.

According to the docs that should be doable using ${ propertyAlias.length }, When I use `${ menuItems.length }` (menuItems is the property that holds the blocklist) The label is empty. Anything I am missing? We will upgrade to V17 soonish so if it is working there I would also love to know.

Thanks,

Richard

---

<div class="post-metadata">

**Author:** ![nielslyngsoe](https://forum.umbraco.com/user_avatar/forum.umbraco.com/nielslyngsoe/32/610_2.png) [@nielslyngsoe](https://forum.umbraco.com/u/nielslyngsoe)\
**Post date:** [November 19, 2025, 6:43pm UTC](https://forum.umbraco.com/t/ufm-how-to-get-the-length-of-a-blocklist-array/6711/2 "2025-11-19T18:43:51Z")

</div>

Hi @rsoeteman

I would assume the problem is that the model for Block Editors are more complex than a simple array.  
You can read about the model here: [Block Grid | Umbraco CMS](https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor#creating-a-block-grid-programmatically)

So I would mean you should try something like this:

`${ menuItems.layout['Umbraco.BlockList'].length }`

I hope that works, or leads you to a solution.

Best, Niels

---

<div class="post-metadata">

**Author:** ![rsoeteman](https://forum.umbraco.com/user_avatar/forum.umbraco.com/rsoeteman/32/296_2.png) [@rsoeteman](https://forum.umbraco.com/u/rsoeteman)\
**Post date:** [November 20, 2025, 7:45am UTC](https://forum.umbraco.com/t/ufm-how-to-get-the-length-of-a-blocklist-array/6711/3 "2025-11-20T07:45:27Z")

</div>

Thanks Niels, will try that!

---

<div class="post-metadata">

**Author:** ![system](https://forum.umbraco.com/uploads/default/original/1X/624adeddd330a3d0268a184db47946ca7e82c676.png) [@system](https://forum.umbraco.com/u/system)\
**Post date:** [December 20, 2025, 7:46am UTC](https://forum.umbraco.com/t/ufm-how-to-get-the-length-of-a-blocklist-array/6711/4 "2025-12-20T07:46:08Z")

</div>

Closed on December 20, 2025, 7:46am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
