> ## Documentation Index
> Fetch the complete documentation index at: https://developers.clay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# workflows actions dynamic-fields

> Resolve an action parameter whose options or fields depend on other inputs.

Resolve an action parameter whose options or fields depend on other inputs — a dependent dropdown's values, or a field set revealed by an earlier choice. Get the `packageId` and `actionKey` from [`clay workflows actions list`](/cli/reference/workflows-actions-list), and the parameter names from [`clay workflows actions schema`](/cli/reference/workflows-actions-schema).

Configuring cascading inputs is iterative: resolve and fill one input, then re-run with it in `--inputs` to resolve the next dependent parameter.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay workflows actions dynamic-fields <packageId> <actionKey> <parameterPath> [--type <type>] [--account <id>] [--inputs <json|file|->]
```

## Arguments

| Argument        | Description                                                                                |
| --------------- | ------------------------------------------------------------------------------------------ |
| `packageId`     | Action package id, from `workflows actions list`. Required.                                |
| `actionKey`     | Action key, from `workflows actions list`. Required.                                       |
| `parameterPath` | Parameter name; use dot-notation for grouped params (e.g. `objectSchema.stage`). Required. |

## Flags

| Flag                       | Description                                                                                                       |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `--type <type>`            | `select` resolves a dependent dropdown's values; `input` resolves a revealed field set. Defaults to `select`.     |
| `--account <id>`           | Connected account id (`authAccountId`) for actions that need auth.                                                |
| `--inputs <json\|file\|->` | Already-chosen input values as a JSON object keyed by parameter name: inline JSON, a file path, or `-` for stdin. |

## Output

The command returns an array of resolved parameters. The `dynamicData` shape depends on `--type`. `errors[].isBlocking` is load-bearing: when it is `true`, abort cascading input resolution.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "parameterPath": "property",
    "dynamicData": [{ "value": "companies", "displayName": "Companies" }],
    "errors": [
      {
        "errorMessage": "Account not connected.",
        "errorStatus": "auth_error",
        "isBlocking": true
      }
    ],
    "logUrl": "https://..."
  }
]
```

| Field           | Type              | Description                                                                                           |
| --------------- | ----------------- | ----------------------------------------------------------------------------------------------------- |
| `parameterPath` | string            | The resolved parameter.                                                                               |
| `dynamicData`   | array             | Resolved values or fields; shape depends on `--type` (see below).                                     |
| `errors`        | array (optional)  | Resolution errors. Each has `errorMessage`, optional `errorDetails`, `errorStatus`, and `isBlocking`. |
| `logUrl`        | string (optional) | Link to server logs for this resolution.                                                              |

`dynamicData` by `--type`:

\| `--type` | `dynamicData` shape                                                                                                           |
\| -------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
\| `select` | `[ { "value": <string>, "displayName": <string> } ]` — `value` is what you pass back in a later `--inputs` call.              |
\| `input`  | Revealed input-parameter schema objects forwarded from the server. Each `name` is prefixed to pipe notation (`<parameterPath> | <field>`) so it can be bound directly — the bare name drops the value at run time. |

## Errors

| Code               | Exit | Notes                                                                                          |
| ------------------ | ---- | ---------------------------------------------------------------------------------------------- |
| `validation_error` | 2    | Required arguments missing, or `--inputs` is unreadable, not valid JSON, or not a JSON object. |
| `auth_forbidden`   | 3    | The API key lacks permission for this command.                                                 |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay workflows actions dynamic-fields <packageId> create-object objectType --account acc_123 | jq '.[0].dynamicData'
clay workflows actions dynamic-fields <packageId> create-object property --account acc_123 --inputs '{"objectType":"companies"}' | jq -r '.[0].dynamicData[].value'
```
