# forA with a list and additional parameter

**URL:** <https://forum.canton.network/t/fora-with-a-list-and-additional-parameter/4766>\
**Category:** App Development\
**Created:** [June 20, 2022, 5:59pm UTC](https://forum.canton.network/t/fora-with-a-list-and-additional-parameter/4766 "2022-06-20T17:59:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashok\_Raj](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ashok_raj/32/4005_2.png) [@Ashok\_Raj](https://forum.canton.network/u/Ashok_Raj)\
**Post date:** [June 20, 2022, 5:59pm UTC](https://forum.canton.network/t/fora-with-a-list-and-additional-parameter/4766/1 "2022-06-20T17:59:02Z")

</div>

In trigger, I am using forA to run a function over a list. Addiitional i want to pass the party which is running the trigger as a parameter to the same function. How do i do that.

here is the flow

```haskell
list <- Query and filter contracts
apply function Func1 on the each contract on the list
Inside Func1, I am exercising a choice, where i need to specify who is the party that's exercising the choice

```

i tried

```haskell
forA listContracts function1 party

function1 : ContractTemplate -> Party->TriggerA () ()
function1 contracts party = do

```

If there is no option, is there a way to pull the current party thats running the trigger with a function

---

<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:** [June 20, 2022, 6:09pm UTC](https://forum.canton.network/t/fora-with-a-list-and-additional-parameter/4766/2 "2022-06-20T18:09:11Z")

</div>

You can do something like this

```haskell
rule party = do
  …
  forA … (\c -> function1 c party)

```

It’s common to swap the arguments to such functions if you often use them this way, then you can do something like this:

```haskell
function1 : Party -> ContractTemplate -> TriggerA () ()
function1 = …

rule party = do
  …
  forA … (function1 party)

```
