# makePartiesFrom variable not in scope error

**URL:** <https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506>\
**Category:** App Development\
**Created:** [April 22, 2021, 5:19pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506 "2021-04-22T17:19:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![krmmalik](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/krmmalik/32/1410_2.png) [@krmmalik](https://forum.canton.network/u/krmmalik)\
**Post date:** [April 22, 2021, 5:19pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/1 "2021-04-22T17:19:16Z")

</div>

Is the `makePartiesFrom` a new addition to the SDK to allocate parties? I’ve not seen this before and can’t find any reference to this in the documentation except for setting up a multiple party agreement.

I used the reference documentation to create the following code

```haskell
parties@[alice, hakan, martin, rita, john, michael, sam, james] <- makePartiesFrom ["Alice", "Hakan", "Martin", "Rita", "John", "Michael", "Sam", "James"]

```

But I got a `variable not in scope` error? I started my project on v1.09 of the SDK I believe it was so could that be the reason this line of code is not working?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [April 22, 2021, 5:21pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/2 "2021-04-22T17:21:51Z")

</div>

It’s part of the example code but hidden from the docs. It is not a standard library function. You can see the definition [here](https://github.com/digital-asset/daml/blob/5775ecc8ff944da136e5d52daa494931b4e86938/docs/source/daml/patterns/daml/Utilities.daml#L7) if you want to copy it into your own project although it’s probably easier to just inline `mapA getParty` or even better `mapA allocateParty` for Daml Script instead of scenarios.

---

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [April 22, 2021, 5:26pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/3 "2021-04-22T17:26:35Z")

</div>

I was typing it but @cocreature beat me to the punch, alas here is the equivalent code to that example (which should probably be updated).

```haskell
makePartiesFrom names = mapA allocateParty names

test = script do
  [a, b] <- makePartiesFrom ["a", "b"]

```

---

<div class="post-metadata">

**Author:** ![krmmalik](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/krmmalik/32/1410_2.png) [@krmmalik](https://forum.canton.network/u/krmmalik)\
**Post date:** [April 22, 2021, 5:50pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/4 "2021-04-22T17:50:43Z")

</div>

Ok, thanks guys @anthony and @cocreature . I’ll try this when I get back to my desk. Little omissions and differences like this can really throw off a beginner coder like me.

There seem to be a number of different ways to do the same thing as well. It would be good to see some standardisation.

---

<div class="post-metadata">

**Author:** ![krmmalik](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/krmmalik/32/1410_2.png) [@krmmalik](https://forum.canton.network/u/krmmalik)\
**Post date:** [April 22, 2021, 5:57pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/5 "2021-04-22T17:57:03Z")

</div>

Would love to see the complete code in it’s entirety in the documentation example

---

<div class="post-metadata">

**Author:** ![anthony](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/anthony/32/419_2.png) [@anthony](https://forum.canton.network/u/anthony)\
**Post date:** [April 22, 2021, 6:34pm UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/6 "2021-04-22T18:34:16Z")

</div>

> [@krmmalik](#):
>
> There seem to be a number of different ways to do the same thing as well. It would be good to see some standardisation.

100% agree, docs, howtos, and tutorials are something we’re going to focus on a lot in Q2.

---

<div class="post-metadata">

**Author:** ![krmmalik](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/krmmalik/32/1410_2.png) [@krmmalik](https://forum.canton.network/u/krmmalik)\
**Post date:** [April 26, 2021, 11:13am UTC](https://forum.canton.network/t/makepartiesfrom-variable-not-in-scope-error/2506/7 "2021-04-26T11:13:20Z")

</div>

I couldn’t get it to work, so I just went back to allocating parties the normal way

` alice <- allocateParty "Alice"`
