Actions

Actions are mini-tasks that can modify data in your app or navigate to a different part of the app. 

Where do Actions appear in the app?

Quick Actions

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

Bulk Actions

In the Table, Deck, and Gallery views, actions can be applied in bulk to many rows at one shot.

To use bulk actions:
1. Enter selection-mode by pressing the select button on a Table, Deck, or Gallery view that has one or more actions (Data > Actions in the editor) or that allows users to delete records. You can alternately long-press any row to enter selection-mode.

2. Once in selection mode, tap on some rows to select them. As you select rows, actions will appear on the top right corner of the screen. Note: only actions that are valid for all selected rows will appear.

3. Finally, tap an action to update all the selected rows. If the app has delayed sync enabled, the changes will be queued, otherwise a sync will be triggered.

 

How to create Actions

Actions can be added in the Behavior > Actions part of the editor. Each action definition includes the following components:

Name: The text shown by the action button

Icon: The icon shown in the action button

Table: The table that this action applies to

Condition: (optional) The action will only be shown if this expression results in a "true" value. If left blank, the action will always be shown.

Type: What will happen when the action is triggered

NeedsConfirmation: Show a popup confirming the action when the user taps the action button

Prominence: AppSheet will automatically show the actions throughout the app: this option controls how visible actions will be in the app.

Other: Depending on the type, other options will be available.

actions_screenshot.png

 

Action Types

1) Set the value of a column

Set or update the value of a field on the row.

Options:
Column: The column to be updated when the action is triggered
Value: The value to set the column to when the action is triggered. This can be 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.


2) Go to a website

Navigate to a URL of your choosing.

Options:
NavigateTarget: The 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.

Common uses:

  • Google searching a value from the row: CONCATENATE("https://google.com/search?q=", [Search Column Name])


3) Go to another view or app

Open a different AppSheet app, or go to another view in the current app.

Options:
NavigateTarget: The 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

4) Copy row

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

5) Send an email

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

Options:
To: The intended recipient of the email. 

6) Make a phone call

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

Options:
To: The intended recipient of the phone call. 

7) Send a text message

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

Options:
To: The intended recipient of the message.

Message: The message to send 

8) Open a file

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

Options:
To: The file to open. 

9) Execute a sequence of such actions (Composite Action)

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

Check out the Equipment Inventory app for an example.

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.