# Reading participant from script

**URL:** <https://forum.canton.network/t/reading-participant-from-script/6693>\
**Category:** App Development\
**Tags:** canton\
**Created:** [June 20, 2023, 10:26am UTC](https://forum.canton.network/t/reading-participant-from-script/6693 "2023-06-20T10:26:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joy\_K](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/joy_k/32/6616_2.png) [@Joy\_K](https://forum.canton.network/u/Joy_K)\
**Post date:** [June 20, 2023, 10:26am UTC](https://forum.canton.network/t/reading-participant-from-script/6693/1 "2023-06-20T10:26:35Z")

</div>

Suppose a Dar file has multiple Daml files and scripts for it.one of those script have list of participant user.  
1.How to execute scripts on canton  
2.how to read list of participant  
3.how participant.json can be created from canton can you please send the command  
how i will use this ‘utils.generate\_daml\_script\_participants\_conf’

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/daml/original/2X/e/eedca0936a97fd3fe66d703e4f8491bbbe91ccf7.png)  
Why I am getting this error @ daml script --dar epamcoins-0.1.0.dar --script-name Test.Setup:setup --participant-config participant.json  
(console):1:33 expected id  
daml script --dar epamcoins-0.1.0.dar --script-name Test.Setup:setup --participant-config participant.json

---

<div class="post-metadata">

**Author:** ![solomonchauda](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/solomonchauda/32/4715_2.png) [@solomonchauda](https://forum.canton.network/u/solomonchauda)\
**Post date:** [June 21, 2023, 6:24am UTC](https://forum.canton.network/t/reading-participant-from-script/6693/2 "2023-06-21T06:24:09Z")

</div>

Hello @Joy_K

1. Daml scripts are executed on your terminal, outside of the canton console.

2. What exactly are you trying to list? For parties, you can use the command, “participant1.parties.list()”

3. 

Here is a following example of how to add the option for an output file of your script.  
`daml script --dar .daml/dist/script-example-0.0.1.dar --script-name ScriptExample:allocateParties --ledger-host localhost --ledger-port 6865 --output-file participant.json`

Once the results of the given --script-name is written into the output file, you may use the following example to use the output file:  
`daml script --dar .daml/dist/script-example-0.0.1.dar --script-name ScriptExample:initialize --ledger-host localhost --ledger-port 6865 --input-file participant.json`

More information regarding running scripts can be found in the documentation below:  
[https://docs.daml.com/daml-script/index.html#run-a-script](https://docs.daml.com/daml-script/index.html#run-a-script)

Hope this helps!

Best Regards,  
Solomon
