> For the complete documentation index, see [llms.txt](https://docs.klai.studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.klai.studio/reference/actions-processor/actions_overview/path.md).

# path

`path` navigates the user to another route, opens an external URL, or retargets an existing BetterForms window.

The old rule that "`path` must always be the last action" is too absolute for the current runtime.

What actually happens depends on which navigation mode you use.

| Key                | Type     | Description                                                                                                                                                                                                                                              |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| action             | `"path"` | Action Name                                                                                                                                                                                                                                              |
| options.windowName | *string* | <p>{ optional } If specified, BetterForms updates the target card/modal window with the matching name instead of opening a normal route or URL navigation. This is useful when you want to retarget an existing BetterForms window.</p><p>ver 0.8.2+</p> |
| options.path       | *string* | { optional } Internal BetterForms route, for example `/`, `/dash`, or `/form/:id`.                                                                                                                                                                       |
| options.url        |          | { optional } External URL to open.                                                                                                                                                                                                                       |
| options.sameWindow |          | { optional } If true with `options.url`, BetterForms replaces the current browser tab instead of opening a new one.                                                                                                                                      |
| options.name       | *string* | Target name used by `window.open()` when opening an external URL. If omitted, BetterForms uses `_blank`. ( Ver 0.10.22+ )                                                                                                                                |
| options.features   | *string* | Window features as described in [MDN here](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features). ( Ver 0.10.22+ )                                                                                                               |

## Runtime Behavior

| Mode                         | Key(s) used                        | What BetterForms does                 | Action thread continues? |
| ---------------------------- | ---------------------------------- | ------------------------------------- | ------------------------ |
| Internal route               | `options.path`                     | Calls the Vue router                  | Yes                      |
| External URL, new tab/window | `options.url`                      | Calls `window.open()`                 | Yes                      |
| External URL, same tab       | `options.url` + `sameWindow: true` | Replaces the current browser location | No                       |
| Existing BetterForms window  | `options.windowName`               | Updates the target BetterForms window | Yes                      |

For same-window external navigation, treat `path` as the last meaningful action because the browser is leaving the BetterForms app.

For internal routes and new-tab external links, the action queue can continue after navigation.

```json
{
  "action": "path",
  "options": {
    "path": "/invoiceList"
  }
}
```

```json
{
  "action": "path",
  "options": {
    "url": "https://docs.fmbetterforms.com/",
    "sameWindow": true
  }
}
```

```json
{
  "action": "path",
  "options": {
    "url": "https://example.com/report.pdf",
    "name": "_blank",
    "features": "noopener,noreferrer"
  }
}
```

## FileMaker Custom Function

```
BF_SetAction_Path("/form/123-1234-5678")
```
