# How can I use multiple parameters in a script that runs against Daml-Hub?

**URL:** <https://forum.canton.network/t/how-can-i-use-multiple-parameters-in-a-script-that-runs-against-daml-hub/4470>\
**Category:** App Development\
**Tags:** daml, damlhub\
**Created:** [May 3, 2022, 4:49pm UTC](https://forum.canton.network/t/how-can-i-use-multiple-parameters-in-a-script-that-runs-against-daml-hub/4470 "2022-05-03T16:49:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cohen.avraham](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@cohen.avraham](https://forum.canton.network/u/cohen.avraham)\
**Post date:** [May 3, 2022, 4:49pm UTC](https://forum.canton.network/t/how-can-i-use-multiple-parameters-in-a-script-that-runs-against-daml-hub/4470/1 "2022-05-03T16:49:15Z")

</div>

G-d willing

Hello,  
Following my previous [discussion](https://discuss.daml.com/t/how-can-i-use-a-specific-contract-id-which-exists-on-the-ledger-within-a-script/4459), I would like to ask how do I define (and use) multiple parameters from within the `--input-file`.  
I understand that this is a JSON file.  
I was told that when it is only 1 parameter, the file will only contain the text value between " char.  
But how do I separate different arguments when I need to use more than one?

---

<div class="post-metadata">

**Author:** ![alex.graham](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/alex.graham/32/830_2.png) [@alex.graham](https://forum.canton.network/u/alex.graham)\
**Post date:** [May 3, 2022, 5:06pm UTC](https://forum.canton.network/t/how-can-i-use-multiple-parameters-in-a-script-that-runs-against-daml-hub/4470/2 "2022-05-03T17:06:15Z")

</div>

Hi @cohen.avraham,

To have multiple parameters for the `--input-file` you can create a custom data type which would correspond to the format and data you use for the input file.

For example:

```haskell
module MyScript where

import Daml.Script

data ScriptSettings = ScriptSettings with
    userParty : Party
    userName : Text
    userEmail : Text
  deriving (Show, Eq)

runScript : ScriptSettings -> Script ()
runScript ScriptSettings{..} = do
  debug $ "The username is " <> userName
  return ()

```

Then the `--input-file` JSON might look something like:

```haskell
{
  "userParty": "ledger-party-kj2340xfkjsdf0923j",
  "userName": "Alice"
  "userEmail": "alice@company.com"
}

```

---

<div class="post-metadata">

**Author:** ![cohen.avraham](https://avatars.discourse-cdn.com/v4/letter/c/a87d85/32.png) [@cohen.avraham](https://forum.canton.network/u/cohen.avraham)\
**Post date:** [May 3, 2022, 6:41pm UTC](https://forum.canton.network/t/how-can-i-use-multiple-parameters-in-a-script-that-runs-against-daml-hub/4470/3 "2022-05-03T18:41:28Z")

</div>

Thank you very much, it works.
