# Is there a formula to get all users that have access to a doc?

**URL:** <https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124>\
**Category:** Ask the Community\
**Created:** [October 9, 2019, 1:01am UTC](https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124 "2019-10-09T01:01:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Solorzano](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/jonathan_solorzano/32/9383_2.png) [@Jonathan\_Solorzano](https://connect.superhuman.com/u/Jonathan_Solorzano)\
**Post date:** [October 9, 2019, 1:01am UTC](https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124/1 "2019-10-09T01:01:04Z")

</div>

I would like to get the users count of a doc to take some actions, is there any function for that?

---

<div class="post-metadata">

**Author:** ![Jean\_Pierre\_Traets](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/jean_pierre_traets/32/16275_2.png) [@Jean\_Pierre\_Traets](https://connect.superhuman.com/u/Jean_Pierre_Traets)\
**Post date:** [October 9, 2019, 10:46am UTC](https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124/2 "2019-10-09T10:46:45Z")

</div>

Dear @Jonathan_Solorzano, welcome to the community 🤝

Unfortunately I am not aware how to do, but in this community and from the Codans we could expect some creative input 💠

👍 for the idea, to only thing that comes in mind is to make a table from all users that have access to the doc and accordingly to measure against this table.  
_Obviously the shortcoming is how to assure that it’s up to date according the actual sharing settings_

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [October 9, 2019, 11:49am UTC](https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124/3 "2019-10-09T11:49:14Z")

</div>

There’s a secret formula: `$$[grid:Global-Document-People]`. It returns a table of all users in the doc, so you can `.Count()` on that. It includes system users like Automation Bot and System Writer though, so adjust accordingly:  
 ![image](https://global.discourse-cdn.com/coda1/original/2X/f/f1252bcab0e0fdd3f2249f7ea1f887b8aeeda544.png)

WARNING: really unsafe to use in production! It may get you on the radar and your doc disabled by Codans.

Props to @Dalmo_Mendonca for discovering this.

---

<div class="post-metadata">

**Author:** ![chris](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/chris/32/6725_2.png) [@chris](https://connect.superhuman.com/u/chris)\
**Post date:** [October 9, 2019, 6:52pm UTC](https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124/4 "2019-10-09T18:52:25Z")

</div>

Codan here 🙂

I highly recommend not using “system” or “Global” grids in this manner. We are changing how these things work behind the scenes routinely and using them directly is guaranteed to break your doc at some point.

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [October 10, 2019, 1:51pm UTC](https://connect.superhuman.com/t/is-there-a-formula-to-get-all-users-that-have-access-to-a-doc/11124/5 "2019-10-10T13:51:23Z")

</div>

![image](https://global.discourse-cdn.com/coda1/original/2X/b/b296cd61591b6ed93edc2218f45b9b904fe28b18.jpeg)
