# Action Params

An *action param* defines a named input that a caller passes into an action when it is triggered. Within the action, the value is available as a context param and can be referenced in [conditions](/reference/platform-concepts/conditions.md), [filters](/reference/platform-concepts/filters.md), and [functions](/reference/platform-concepts/functions.md).

Action params make actions reusable. Instead of building a separate action for every variation of the same logic, you define the action once and let the caller supply the values that differ. A common example is a navigation action in an app: the action accepts an action param with the data type `View`, and a single [Navigate](/library/action-nodes/navigate.md) action node navigates to whatever view the caller specifies.

### What an action param can accept

An action param's data type determines what the caller can pass in:

* **Primitive values** — strings, numbers, booleans, and other basic value types available on the platform.
* **Enumerated types** — values from an [enumerated type](/reference/data-model/enumerated-types.md) defined in the solution. An enumerated-type param can have cardinality one (a single value) or many (a list of values).
* **Schemas** — structured data, with the schema defined inline on the param. This allows a caller to pass complex, nested data into the action without first modelling it as an object class. See [schemas](/reference/platform-concepts/schemas.md).
* **References to object classes** — a reference to a single record (cardinality one) or a set of records (cardinality many) from an object class. See [object classes](/reference/data-model/object-classes.md) for more information on data types.
* **Views** — a reference to a [view](/reference/apps/ui/views.md) in an app. This data type is only available in app actions.

### Creating an action param

Action params are defined on their parent action, alongside action variables and action data sources. The authoring surface differs between flows and apps:

* **In a flow action,** action data is configured on the **Action data** tab in the flow action editor.
* **In an app action,** action data is configured under **Action settings** in the right-side panel.

When adding an action param, choose a name and a data type. If the data type is set to schema, the **Edit schema** dialog opens where the schema structure is defined inline. An action param can be marked as required, which means the caller must always provide a value. If it is not required, a default value can be specified.

### Passing action params

When an action is triggered, the caller maps values into the action's params. How this happens depends on the trigger:

**From the UI.** When an action is triggered by an [event handler](/reference/platform-concepts/event-handlers.md), action param values are configured on the event handler. Each param is bound to a value from the calling context — a data source property, an app variable, or a function result.

**From another action.** When an action is called by [Run Action](/library/action-nodes/run-action.md) or a flow is called by [Run Flow](/library/action-nodes/run-flow.md), the target action's params are displayed on the action node. Each param is bound to a value from the calling context in the same way — the only difference is that Run Action calls an action in the same app or flow, while Run Flow calls a flow from an app or from another flow. Because action params support schemas, structured data can be passed directly into an action or flow without first persisting it.

### Reusing action params across actions

An action param — including any inline schema it carries — can be copied and pasted into another action. This works across actions in the same flow, across different flows, and into app actions. Copy-paste is the primary mechanism for replicating a param definition, and it carries the full schema structure along with it.

### Properties

| Property          | Description                                                                                                                                                                                                                  |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**          | A descriptive name.                                                                                                                                                                                                          |
| **Data Type**     | The type of data accepted as input for this parameter. See [object classes](/reference/data-model/object-classes.md) for more information.                                                                                   |
| **Schema**        | <p><em>Available if <strong>Data Type</strong> is <strong>Schema</strong></em><br><br>Define the schema structure that the param accepts.</p>                                                                                |
| **Cardinality**   | <p><em>Available for enumerated types and object-class references.</em><br><br>Whether the param accepts a single value (<strong>One</strong>) or a list of values (<strong>Many</strong>).</p>                              |
| **Required**      | Require that a value for this parameter is always specified when the action is triggered.                                                                                                                                    |
| **Default Value** | <p><em>Not available if Required is enabled or if data type is a reference to an object class or enum.</em><br><br>Specify a default value to use in the case that a value is not provided when the action is triggered.</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appfarm.io/reference/actions/action-params.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
