# Actions

***

[**Async**](https://docs.stadium.software/actions/async)

<div align="left"><figure><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-98868a06e6691fe96b2fb459aa260708efeaeda0%2Fasync.png?alt=media" alt=""><figcaption></figcaption></figure></div>

Async allows for the asynchronous running of [*Scripts*](https://github.com/stadium-software/docs/blob/main/features/scripts-and-\[Event]\(../features/events.md\)-handlers.md), [*Connector*](https://docs.stadium.software/connectors)s and web services in your app.

***

[**Call Webservice**](https://docs.stadium.software/connectors/web-service-connector)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-91620b2e19541072a1559eba68d72447d54c2f52%2Fcallwebservice.png?alt=media" alt="" width="64"></div>

A Web Service is a method of communication between two electronic devices over http. You can use a Web Service to pull in some information generated by another application onto a Stadium page

***

[**Decision (If/Else)**](https://docs.stadium.software/actions/decision-if-else)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-3203943fcbf70ec064a2acc49307a0c65e1f996f%2Fdecision.png?alt=media" alt="" width="64"></div>

Decisions allow for the definition of conditional statements. On the page, these statements will execute some functionality according to a specific condition.

***

[**Display Message Box**](https://docs.stadium.software/actions/display-message-box)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-fd3451f41512ce704198cd74310afbbaf1499abb%2Fdisplaymessagebox.png?alt=media" alt="" width="64"></div>

The action uses a JQuery dialog window to display some information or request a decision from a user.

***

[**Download File**](https://docs.stadium.software/actions/download-file)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-ab51ca7823d1d28b8769bf3d1a0d430dd037067d%2Fdownloadfile.png?alt=media" alt="" width="64"></div>

The action will fetch a file from the server and request the user to download it.

***

[**For Each**](https://docs.stadium.software/actions/foreach)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-6436b390a6119b37cebd5d3c0fd2248ec7e1f6d8%2Fforeach.png?alt=media" alt="" width="64"></div>

Loop through a comma separated list of values and for each value do a certain action.

***

[**Java Script**](https://docs.stadium.software/actions/javascript)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-350b1ae2a3c93aede2df0661a8e76763f0d76be9%2Fjavascript.png?alt=media" alt="" width="64"></div>

Include JavaScript code in your application.

***

[**Lists**](https://docs.stadium.software/actions/list)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-293ce3e096646e0ca2562358a1f2e08294aa6603%2Flist.png?alt=media" alt="" height="64" width="64"></div>

Working with Lists.

***

[**Navigate To Page**](https://docs.stadium.software/actions/navigate-to-page)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-c3178dcae081da9386c9e400eacf1b8b390cbab2%2Fnavigatetopage.png?alt=media" alt="" width="64"></div>

You can use this action to navigate the user away from a page and onto another one.

***

[**Notification**](https://docs.stadium.software/actions/notification)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-0660e86498ee8f0113139f25475da67ddb19173e%2Fnotification.png?alt=media" alt="" width="64"></div>

You can use this action to display a notification to the user.

***

[**Set Value**](https://docs.stadium.software/actions/set-value)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-5f330b9a92b5d6428f9c24b0747c614e1c8f3a74%2Fsetvalue.png?alt=media" alt="" width="64"></div>

SetValue is used for setting the values of the various script elements.

***

[**Variable**](https://docs.stadium.software/actions/variable)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-34f405b6432c737b2105c6f5eacdb3c47ad8d4b3%2Fvariable.png?alt=media" alt="" width="64"></div>

Variables are placeholders for values inside a script. They can be initialised with a value or set using the SetValue action.

***

[**While**](https://docs.stadium.software/actions/while)

<div align="left"><img src="https://3514041584-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqxH8JA8xG3I22tiZG5H6%2Fuploads%2Fgit-blob-ce5f2e7c59c342ae9d9f4979eb76a19247eecaa7%2Fwhile.png?alt=media" alt="" width="64"></div>

A type of loop that will evaluate a specified condition either at the beginning or at the end of each iteration, and that will continue to loop whilst the condition is true.


---

# 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.stadium.software/actions.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.
