Actions: The Essentials

Actions perform specific operations. Actions can be extremely helpful in accomplishing a variety of different tasks with your app, from email to copying a row. It's also possible to execute a sequence of actions.

There are three types of actions included in an app definition, as described in Action types.

  • Navigation: Navigate to a different view within an app
  • Data-change: Modify (add, delete, update) data in your app
  • External communication: Send information to an external service (such as a push notification or an SMS message)
  • Composite: Execute a sequence of actions in a specific order

Besides the actions you can create in your app, other actions are automatically created. You can learn more about system actions and how to control them.

Not only can you create actions, you can also configure them to run when certain view navigation events happen using view events.

Learn more about actions in this video:

Actions

The following sections provide more information about actions:

Where do actions appear?

Quick actions

In the detail view, a button is shown for each action in your app. When the button is tapped, the action is triggered.

Details view showing action buttons

Bulk actions

In the table, deck, and gallery views, actions can be applied in bulk across many rows simultaneously. See Use bulk actions.

Where can an action run?

All AppSheet apps run on a device or in a browser. However, all apps are actually hosted from the AppSheet cloud service (also called the AppSheet backend) so some actions can also run in the cloud service, as follows:

  • Navigation actions can only run in the app on the device or in a browser.
  • Data- change actions can run in the app or in the cloud service. The app data is accessible and can be changed at either location.
  • External communication actions only run in the cloud service. This is a point-in-time implementation limitation. These actions may be supported in the app as well in the future.

When does an action run?

Every action has to be triggered by some event that causes it to run. As the app creator, you control the trigger, as follows:

  • Explicit user invocation: Define an action to be shown as a visual icon or button. When the user taps or clicks on the icon or button, the app invokes the action.
  • Implicit user invocation: Every view in the app has some standard behaviors when a user interacts with the data in the view. For example, when a user taps on a row in a tabular view, that specific row is shown in detail in a Detail view. By default, the tap-on-row event triggers a system-defined UI Navigation action that takes the user to the new view. As the app creator, you can control a subset of the triggering events associated with each UX view.
  • Automatic invocation in the cloud service: Define automation bots that run in the cloud service and execute actions when specific changes occur or on a schedule.

Create an action

To create an action:

  1. Open the app in the editor.
  2. Select Behavior > Actions.
  3. Enter the following information:
     
    Property Description
    Name Displayed name of the action. Defaults to New Action.
    For a record of this table Table to which the action applies.
    Do this

    Action to be performed. Select an action from the drop-down list. See Action types.

    Note: Based on the type selected, additional configuration options may be displayed, and are described with the action type descriptions.

  4.  Configure the action.

  5. When you are done, save your changes by selecting one of the following:

    • Save - Save the app
    • Save & verify data - Save the app and verify the data defined.

Configure an action

Configure an action by using the settings described in the following sections.

 Appearance

All actions have configurable appearance options. The appearance options affect how the view is presented in the navigation bar along the bottom of the app display, and in the app's main menu.

Appearance options for actions.

Configure the action appearance by using the settings defined in the following table.

Setting

Description

Display name

Name displayed for the action. Enter a fixed value (T) or to a text expression (flask).

Display name using expression

If Display name is not specified or if set to an expression that evaluates to a blank value, the action's name is used.

Action Icon

Icon to be displayed along with the action's Display name (see above). Choose an icon from the predefined list. Custom icons are not allowed. Every action must have an icon. If no icon is selected, a type-specific default will be used.

Prominence Control the prominence of the action or hide it from the display.

Behavior

All actions have configurable behavior options that control which rows to display the action and whether or not it requires confirmation before being applied.

Configure the action behavior by using the settings defined in the following table.

Setting

Description

Only if this condition is true

Expression that controls which rows display the action.

Needs confirmation?

Toggle that controls whether or not the action requires confirmation.

Confirmation Message Confirmation message to display if Needs confirmation? is enabled.

Documentation

Expand the Documentation section and enter a descriptive comment for the card view that will enable collaborators to easily understand its purpose.

Action types

The following summarize actions that can be performed for each type.

Navigation action types

The navigation action types are listed below.

App: copy this row and edit the copy

Copies the current row and opens it in a form view.

App: export this view to a CSV file

Downloads the rows in the current view to a CSV file. This action only works on desktop browsers and not in iOS or Android apps.

Options:

  • CSV file locale: Locale of the exported CSV file.

See the following sample templates:

To send CSV files in an email, see Use CSV templates.

App: go to another AppSheet app

Opens a different AppSheet app.

Options:

  • Target: App deep link to navigate to when the action is triggered. This can be an expression to compute the value at the time the action is triggered. This uses the same structure as the app column type.

App: go to another view within this app

Navigates to another view in the current app.

Options:

  • Target: App deep link to navigate to when the action is triggered. This can be an expression to compute the App at the time the action is triggered. This uses the same structure as the app column type.

App: import a CSV file for this view

Uploads the rows in a CSV file to the current view as described in Import a CSV file for this view.

App: open a form to add a new row to this table

Opens a form that enables users to add a new row to the current table.

App: open a form to edit this row

Opens a form that enables users to edit a row in the current table.

Data-change action types

The data-change action types are described below.

Data: delete this row

Deletes the current row.

Data: execute an action on a set of rows

This bulk action option is an expression based version of bulk select. This automated version selects the rows using an expression rather than a user, such as yourself, selecting the bulk actions using your applications user interface. 

Options:

  • Referenced Table: Table whose action will be executed.
  • Referenced Rows: Rows to act on from the referenced table.
  • Referenced Action: Action to apply to the referenced rows.

Understanding the following topics will help you better understand this feature:

To use this action there are a few items you'll need to become more familiar with. First, review the "Changing Multiple Data Values in Another Table" section in this document on Changing Data from a Workflow Rule. Second, review the SELECT() expression. Understanding how both elements work in concert with each other will allow you to execute this feature quickly to help you scale your process.

Data: set the value of some columns in this row

With this action type, you can set or update the value of a field on the current row.

Options:

  • Set these columns: Columns and values to be updated when the action is triggered. You can specify an expression to compute the value that will be run at the time the action is triggered.

Common uses:

  • Marking a task as complete
  • Updating a ticket priority
  • Assigning a record to someone
  • Adding or subtracting a number
  • Setting a date or time to the current time
  • Setting a Lat/Long column to HERE()

You cannot set the value of a column that:

  • Contains an AppFormula
  • Is a ChangeCounter, ChangeLocation, or ChangeTimeStamp column

Check out the Maintenance Overview app for an example.

Data: add a new row to another table by using values from this row 

 By creating a new action and specifying which separate table data should be added to and defining each column added, rows of data can quickly be updated and moved across all tables in your application.

Options:

  • Table to add to: Select the table you want to the new row to.
  • Set these columns: Values for the columns.

The action setup shown below produces the effect of copying the Email and Course values from the student table, and using the TODAY() and TIMENOW() expressions, to log the Email, Course, current date and time as a new row in the attendance table:

Add a new row to another table

External communication action types

The external communication action types are described below.

External: go to a website

Navigate to a URL of your choosing.

Options:

  • Target: URL to navigate to when the action is triggered. This can be an expression to compute the URL that will be run at the time the action is triggered.
  • Launch External: Enable to launch the web site in the device's browser and not directly in the app.

Common use case:

External: open a file

Opens a viewer for a file on the device running the AppSheet app.

Options:

  • To: File to open. This can be an expression to compute the value at the time the action is triggered.

External: start an email

Opens the email app on the device running the AppSheet app.

Options:

  • To: Recipient of the email. This can be an expression to compute the value at the time the action is triggered.
  • Subject: Subject of the email. This can be an expression to compute the value at the time the action is triggered.
  • Body: Body of the email.

External: start a phone call

Opens the phone app on the device running the AppSheet app.

Options:

  • To: Recipient of the phone call. This can be an expression to compute the value at the time the action is triggered.

External: start a text message

Opens the messaging app on the device running the AppSheet app.

Options:

  • To: Recipient of the message. This can be an expression to compute the value at the time the action is triggered.
  • Message: Message to send. This can be an expression to compute the value at the time the action is triggered.

Composite action type

The composite action type is described below.

Grouped: execute a sequence of actions

Run a set of actions, one-by-one, in order. This can be used to do multiple things when an action button is pressed.

Options:

  • Actions: Actions to run, in order of execution.

For an example,  see the Go to Resource action in the Resource Portal sample template.

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
false
false