# Limit to number of items in a Role array?

**URL:** <https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303>\
**Category:** Ask for Help\
**Created:** [June 20, 2022, 10:18pm UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303 "2022-06-20T22:18:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [June 20, 2022, 10:18pm UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303/1 "2022-06-20T22:18:21Z")

</div>

According to the Glide Builder there is a warning that a user can have only 9 roles. I am assuming my Role Array can only be labeled from 1-9. I currently have 25 ‘roles’ [Role 1, Role 2…Role 25 built in Google Sheets] but only 10 are active. All 10 show up in the Users profile and seem to work in regards to data access restrictions. I am about to add another dozen or so and I wondered if this is a hard limit or a soft limit?

I am using roles as a means of implementing a 5-level deep hierarchy of personal where at the root level they have access to all the data and at the leaf level only their own data. I am ‘flattening’ the tree and using Roles to control data access. I use filters to them show the right data at the right level with access to only data they should be able to view. An end-user (with correct roles) can view data ‘up and down’ the tree depending on access.

So far it works for a 3 level hierarchy but I am moving to 5 levels for the next test which adds another dozen named roles. It works for 10, will it work for 25 (or 30)?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/f/df1863e9089b975c5324ab8b791f53cfeb1d106c.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 21, 2022, 12:27am UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303/2 "2022-06-21T00:27:42Z")

</div>

Probably a question for @Mark or @Jason

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [June 21, 2022, 12:29am UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303/3 "2022-06-21T00:29:59Z")

</div>

The limit of 9 roles is a hard limit, and has technical reasons.

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [June 21, 2022, 12:55am UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303/4 "2022-06-21T00:55:39Z")

</div>

Thanks for the reply, Any thoughts on how to model/implement within Glide secure access (only download the rows you have access to) to data within a standard personnel hierarchy?

Example: CEO has 4 direct reports, VP of Sales has 5 direct reports, etc. CEO can see everything, VP of Sales can only sees sales data and not engineering data.

A ‘manager’ can only see their data and anyone who reports into them. APAC-Sales could not see EMEA-Sales nor US-Sales. Central-US can not see Eastern-US but can see all their direct reports, etc.

This example would have ‘29 roles’ in a flattened hierarchy.

CEO  
VP Engineering  
VP Sales  
Director, Inside Sales  
Director of Field Engineering  
EMEA-Sales  
APAC-Sales  
US-Sales  
Eastern US  
NorthEast, NY/NJ, MidAtlantic, Carolinas,FLGA  
Central US  
GreatLakes, Praire, TOLA, Mo/Tn  
Western US  
Pacific Northwest, NorCal, SoCal, Rockies, Desert  
VP Marketing  
CFO  
Controller  
VP Support

TIA

---

<div class="post-metadata">

**Author:** ![MattLB](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mattlb/32/41284_2.png) [@MattLB](https://community.glideapps.com/u/MattLB)\
**Post date:** [August 28, 2022, 2:35pm UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303/5 "2022-08-28T14:35:17Z")

</div>

Mark - I noticed the role ‘warning’ has changed. It now says “Users with roles assigned will count as Private Users” instead of “Each user can have up to 9 roles”

Did this limit change?

Thanks

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/2/e2ba5e7fa2563b0c767c0c6d3331e52e05fc0208.png)

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [August 28, 2022, 4:37pm UTC](https://community.glideapps.com/t/limit-to-number-of-items-in-a-role-array/43303/6 "2022-08-28T16:37:57Z")

</div>

No, the limit has not changed.
