# Where can i find \`calculateRoster()\` in the docs?

**URL:** <https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 16, 2024, 2:29pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324 "2024-01-16T14:29:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 16, 2024, 2:29pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/1 "2024-01-16T14:29:19Z")

</div>

been combing the docs trying to find this function for more information on how to use the `builder`, but the search bar returns nothing. there's examples here and there with `builder` being used, but nothing on it's signature or an explanation of what it does or how to best use it. 😛 can someone point me to the right location please?

EDIT: i searched for `calculateRoster`, `builder`, `builder alarms`, `alarm calculateRoster`, `calculateRoster()` (just in case), as well as `roster builder`, `email roster builder`, and `email builder`. i case you thought i wasn't thorough... 😉

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 16, 2024, 2:36pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/2 "2024-01-16T14:36:27Z")

</div>

Frankly I've never bothered with the builder...  
A simple json works well enough that I've never seen the point of going further.

Just make sure to make LISTS of emails:

```python
return [
	{'username': "john", 'email': ["bonzo@ledzep.com"]},
	{'username': "ritchie", 'email': ["r.blackmore@purple.com"]},
	...
]

```

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 16, 2024, 2:44pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/3 "2024-01-16T14:44:55Z")

</div>

oooh.... it requires a `username` AND an `email`! the guy before just sent a bigass list like this:

```python
return [
    { "email": ['dude@place.io', 'bro@thing.com', 'pikachu@zap.net`] }
]

```

which seemed sus. there's no docs on _ **what** _ is expected on the other end... 😛

thanks for this. yeah. i prefer just building my own, but i wanted to read the docs so i could use the builder to figure out what the desired output was. circuitous, but without a doc... whaddya-do? 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [January 16, 2024, 2:48pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/4 "2024-01-16T14:48:47Z")

</div>

This should also work.  
There might be some differences in error handling ? I don't know.

I usually pull the roster from a database, which as a username and addresses... So I just keep that structure in the calculated roster, but the username is not required.  
You could probably do the following and it would work just the same:

```python
[
	{'email': "addr1@mail.com"},
	{'email': "addr2@mail.com"},
	...
]

```

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 16, 2024, 3:06pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/5 "2024-01-16T15:06:13Z")

</div>

oh. then that make more sense with what the previous dude was trying to do. our installation here is so borked, it isn't funny. but it's working, so untouchable. 😛 work with what you have, amirite? 🥹

---

<div class="post-metadata">

**Author:** ![Felipe\_CRM](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Felipe\_CRM](https://forum.inductiveautomation.com/u/Felipe_CRM)\
**Post date:** [January 16, 2024, 3:40pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/6 "2024-01-16T15:40:03Z")

</div>

There are these docs that give the full list of possible dictionary keys and what they take:  
[https://docs.inductiveautomation.com/display/DOC81/Notification+Block#NotificationBlock-CalculatedRosters](https://docs.inductiveautomation.com/display/DOC81/Notification+Block#NotificationBlock-CalculatedRosters)  
From the link above:  
"When putting together a dictionary manually, you can use some or all of the properties listed in the table above. You can create as many dictionaries of users as you want, adding in as much or as little contact info."  
Also: "The builder has a set of methods which align with the key:value pairs the dictionary is expecting."

On usernames:  
"This can be anything that you want, the user does not have to exist in the Gateway. It will be used for acknowledgement and auditing purposes, so it is important you create meaningful usernames."

I do wish it was explicitly clear on whether a username is required if you don't have any audit logs or acknowledgment set up.

---

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [January 16, 2024, 3:47pm UTC](https://forum.inductiveautomation.com/t/where-can-i-find-calculateroster-in-the-docs/84324/7 "2024-01-16T15:47:58Z")

</div>

Calulat **ED** Roster **S**... 😑 of course... thank you @Felipe_CRM

and, yeah, i think i'm just going to default to 'send all the things' because i find it's better to look AT it, than look FOR it 🤷‍♂️
