> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/vspy-3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intrepidcs.com/vspy-3-documentation/3.9.21/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-function-block-action.md).

# Script Type Function Block Command: Function Block Action

### Command Description

The Function Block Action command allows one function block script to control the operation of another.

### Value Column Parameters

Double-click the **Value** column to bring up a dialog box to define command settings (Figure 1). There are two parameters to select: the action to take, and the function block to apply the action to.

![Figure 1: Dialog box for the Function Block Action function block script command.](/files/JC4ezUBzEpx04fgZ2TiF)

### Action

Specifies the action to be taken:

* **Start:** Start the selected function block if it is not running.
* **Trigger:** Trigger a [Capture Type Function Block](/vspy-3-documentation/3.9.21/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/capture-type-function-block.md) that is currently waiting to be triggered. To use this option you must select a capture type block, and its collection method must be either **Collect before and after a trigger expression** or **Collect before and after a manual trigger** as specified in the [Stop and Trigger Tab](/vspy-3-documentation/3.9.21/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/capture-type-function-block/capture-type-function-block-stop-and-trigger-tab.md).
* **Save:** Save the data collected by a capture block.
* **Stop:** Stop the selected function block if it is currently running.
* **Call:** Start the function block and then wait until it is finished.

### Function Block

The function block upon which to perform the action. All function blocks in the current setup will be listed in the large white box at bottom right; select one and then press the **OK** button.

The **Find** box allows you to more easily find the right function block in setups where there are many. Type a string in the box to filter the list of function blocks shown in the selection box, so that only those that match the entered string appear. Press **Clear** to resume showing all function blocks again.

### Example

Figure 2 shows a "real world" example of how the **Function Block Action** command can be used. The setup in question is designed to run in a [CoreMini](/vspy-3-documentation/3.9.21/vehicle-spy-main-menus/main-menu-tools/utilities-coremini-console.md) on an ICS hardware device with two nodes. In addition to the script shown, the setup has two others: **Node A Send Data**, designed to run in Node A of the device, and **Node B Send Data**, designed to run on Node B. These two scripts have their [Start Type](/vspy-3-documentation/3.9.21/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-block-start-tab.md) set to **Manual** so they do not run when the device is turned on, while the script in Figure 2 runs immediately. It begins by querying the device's serial number; if it is even, this means the script is running on Node A, so the script starts **Node A Send Data**; otherwise it starts **Node B Send Data**. The startup script then stops.

![Figure 2: Example of a function block script conditionally starting one of two others.](/files/ISQFfyoKYHXKcsuE37Kx)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/3.9.21/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-function-block-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
