
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create the app
/ 25
Create a new supplier order
/ 25
Remove pending supplier orders
/ 25
Discontinue Supplier
/ 25
AppSheet actions are used to control app behavior and to manage user interaction with your app. Actions are operations that change the state of your app, and are frequently represented as buttons throughout the app.
AppSheet supports the following categories of actions:
In this lab, you learn how to perform the following tasks:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long lab resources will be made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It gives you new, temporary credentials to sign in and access AppSheet for the duration of the lab.
To complete this lab, you need:
Make sure you sign in to the lab using an incognito window.
When ready, click .
A new panel will appear with the temporary credentials that you must use for this lab.
If you need to pay for the lab, a pop-up will open for you to select your payment method.
Note your lab credentials. You will use them to sign in to AppSheet for this lab.
Click Open AppSheet to open the AppSheet UI in a separate browser tab or incognito window.
Click to sign in with Google.
In the Sign in with Google dialog, enter the provided Username, and click Next.
Enter the provided Password and click Next.
Click Accept to accept the terms.
To enable AppSheet to access the Google Drive folders associated with your lab account, on the AppSheet consent page, click Allow.
You're now signed in to AppSheet.
To view the AppSheet MyApps page, click X in the top-right corner of the Tell us about you so we can make better recommendations dialog.
The MyApps page might be empty since you do not have any apps yet.
When working on your own or your company's app, you normally would incrementally build the app over a continuous project timeline.
Apps that you build are saved and accessible in the Recent section on the Apps page until they are deployed and published.
In this task, you create the app that was built in a previous lab, using a template.
In the lab environment on some occasions it's possible that the app built in a previous lab is still listed in the Recent section. You cannot use this app to continue working on this lab since the underlying data is not available for use by the app.
The app must first be deleted before you continue with this lab.
If the Inventory Manager
app is listed, on the 3-dots menu, click Delete.
To confirm the deletion, click Delete.
To continue building the Inventory Manager
app in this lab, you must first recreate the app from a template.
To copy the Inventory Manager app to your AppSheet account, click the link: Inventory Manager.
In the app preview, click Accept.
In the left navigation menu, click Copy app ().
In the Copy app form, for App name, type Inventory Manager, and leave the remaining settings as their defaults.
Click Copy app.
AppSheet creates the app and copies the Google sheet that is used by the app to the /appsheet/data/InventoryManager-nnnnnnn
folder under the My Drive folder on Google Drive.
You can also access the app from the Apps page in the AppSheet UI under Owned by me.
Your app is set up with the original Google sheet, and you can now continue to build out the app's functionality.
Click Check my progress to verify the objective.
In this task, you create and use some types of actions that enable user navigation in your app. Note that AppSheet automatically creates system actions for your app.
This action type enables the app user to create a copy of the current data row in the table that is being used in the app and opens the copy in a form view.
In the AppSheet UI, in the left navigation bar, click Actions ().
To create a new action, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
Action name |
Copy Shipment |
For a record of this table |
Shipping |
Do this |
App: copy this row and edit the copy |
For Position, select Display as primary.
Expand the Display section.
For Action icon, type inventory in the search field, and then select an appropriate action icon.
This setting displays the action icon in a stack along with other action icons in the bottom right corner of the app's view.
Expand the Behavior section.
To set this condition in the Expression Assistant, click into the Only if this condition is true field.
This action should only be available if the product's current inventory is greater than zero.
In the expression field of the assistant, delete the default true value and type:
In the Expression Assistant, click Save.
To prompt the app user for confirmation before the action is applied, enable Needs confirmation.
For Confirmation Message, type: Copy shipment?
Click Save.
To test the action, in the bottom navigation bar of the app preview, click Ship/Recv .
To view shipping transactions in the app, click the Shipping tab.
Click on one of the shipping transactions to view its details.
Click the Copy Shipment action, and then click Copy Shipment to confirm. The action executes and opens the Shipping_Detail form view with a copy of the shipping transaction data.
Update the Date Sold and the Quantity column values, and then click Save.
After the data update is synced to the backend, to return to the shipping transactions list view, click Back () in the app preview twice.
Verify that the entry with today's date is listed in the view.
Navigate to the Shipping worksheet on the other browser tab and verify that the new shipping transaction has been created.
This action type enables the app user to navigate from one view to another in the app.
In this task, you create an action to enable the app user to navigate directly from the detail Product Category view to the Products list view for a given category.
To create a new action, in the Actions tab of the AppSheet UI, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
Action name |
List Category Products |
For a record of this table |
Product Categories |
Do this |
App: go to another view within this app |
To open the Expression Assistant, click into the Target field.
In the expression field, type:
In the Expression Assistant, click Save.
For Position, select Prominent.
Expand the Display section.
For Display name, type Category Products
For Action icon, type box in the search field, and then select an appropriate action icon.
This setting displays the action icon just below the data image and above the data values in the app's detail view.
Expand the Behavior section in the form and verify that the Only if this condition is true field contains true, which is the default.
If the condition is not set, click into the field and enter true in the Expression Assistant's expression field. This is done to make sure that this action is always available.
Click Save.
In the bottom navigation bar of the app preview, click Categories.
Click on any of the product categories in the app.
Click on the Category Products action.
In the Products view, verify that the view contains only those products that belong to the selected category.
In this task, you create and use some types of actions that change the data used by your app.
With this action and the values from the current row of a table, you can quickly add a row of data to another table in your app.
To add a new Supplier Orders table to your app, in the left navigation bar, click Data ().
Click Add new data (+).
Select Google Sheet.
Under My Drive, navigate to appsheet > data > Inventory Manager
.
Select the Products sheet.
Check the box for Supplier Orders.
Click Add 1 Table.
In the AppSheet UI, in the left navigation bar, click Actions ().
To create a new action, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
||||||||||
Action name |
New Supplier Order |
||||||||||
For a record of this table |
Products |
||||||||||
Do this |
Data: add a new row to another table using values from this row |
||||||||||
Table to add to |
Supplier Orders |
||||||||||
Set these columns |
|
For Position, select Prominent.
In the Display section, for Action icon, browse the icon list and select an appropriate action icon.
If required, set the condition in the Behavior section to true as described in the previous task. This should already be set by default.
To prompt the app user for confirmation before the action is applied, enable Needs confirmation.
For Confirmation Message, type Create supplier order?
Click Save.
In the bottom navigation bar of the app preview, click Products.
Click on any of the products in the app.
Click on the New Supplier Order action.
Click New Supplier Order to confirm.
After the app syncs the data to the backend, to verify that the new order was created, navigate to the Supplier Orders worksheet on the other browser tab.
In AppSheet, you can create an action for a row of a table that executes another action on a set of related rows in another table.
In this task, you create an action that will delete supplier orders with a status of Pending from the Supplier Orders table for a product in the Products table.
In the AppSheet UI, in the left navigation bar, click Actions ().
To create a new action, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
Action name |
Remove Pending Supplier Orders |
For a record of this table |
Products |
Do this |
Data: execute an action on a set of rows |
Referenced Table |
Supplier Orders |
Referenced Rows |
FILTER(Supplier Orders, AND(([Product] = [_THISROW].[Product ID]), ([Status]="Pending"))) |
Referenced Action |
Delete |
For Position, select Prominent.
In the Display section, for Action icon, type remove in the search field, and then select an appropriate action icon.
In the Behavior section, set the condition to true as described in the previous task. This should already be set by default.
To prompt the app user for confirmation before the action is applied, enable Needs confirmation.
For Confirmation Message, type Remove pending supplier orders?
Click Save.
In the bottom navigation bar of the app preview, click Products.
Click on the Drawer Organizers product in the app. This product has two pending supplier orders in the Supplier Orders worksheet. You can also choose any other product with pending supplier orders.
Click on the Remove Pending Supplier Orders action.
To confirm, click Remove pending supplier orders.
To confirm the system Delete action, click Delete.
After the app syncs the data to the backend, to verify that the pending supplier orders for the selected product have been deleted, navigate to the Supplier Orders worksheet on the other browser tab.
You can use an action to update the value of one or more columns in the current row of a table.
In this task, you create an action to set the value of the Supplier ID column in the Products table to an empty string.
In the AppSheet UI, in the left navigation bar, click Actions ().
To create a new action, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
||
Action name |
Remove Supplier ID |
||
For a record of this table |
Products |
||
Do this |
Data: set the values of some columns in this row |
||
Set these columns |
|
For Position, select Hide.
In the Behavior section, set the condition to true as described in the previous task. This should already be set by default.
Click Save.
External communication actions enable the user of your app to access external services like website URLs and cloud system files and to initiate a phone call, text message, or email from your app.
In this task, you create an action to access a website URL from the app.
In the AppSheet UI, in the left navigation bar, click Actions ().
To create a new action, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
Action name |
Web Search |
For a record of this table |
Products |
Do this |
External: go to a website |
Target |
CONCATENATE("http://google.com?q=", [Product Name]) |
This expression constructs a dynamic URL using the value from the Product Name column of the current row in the Products table.
To open the website in a separate browser window or tab, enable Launch External.
For Position, select Prominent.
Expand the Display section in the form.
For Action icon, type world in the search field, and then select an appropriate action icon.
Click Save.
To test the action, in the bottom navigation bar of the app preview, click Products.
Click on any product to view its details.
In the product details view, click the Web Search action.
The action executes and opens the Google search page with the product name in the search bar on the page.
You can use grouped or composite actions in your app to group together existing actions that are then executed in sequence.
In the AppSheet UI, in the left navigation bar, click Actions ().
To create a new action, click Add Action (+).
Click Create a new action.
In the New Action form, specify the following:
Property |
Value (type or select) |
Action name |
Discontinue Supplier |
For a record of this table |
Products |
Do this |
Grouped: execute a sequence of actions |
For Actions, click Add, and then select the Remove Pending Supplier Orders action.
Click Add again, and then select the Remove Supplier ID action.
For Position, select Prominent.
Expand the Display section in the form.
For Action icon, type remove in the search field, and then select an appropriate action icon.
In the Behavior section, set the condition to true as described in the previous task. This should already be set by default.
To prompt the app user for confirmation before the action is applied, enable Needs confirmation.
For Confirmation Message, type Discontinue supplier?
Click Save.
In the bottom navigation bar of the app preview, click Products, and then click the Spice Rack product to view its details.
In the product details view, click the New Supplier Order action.
To create a new Pending supplier order, click New Supplier Order.
Repeat the previous step to create another Pending supplier order for the same product.
After the app syncs the data to the backend, to verify that the pending supplier orders for the selected product have been created, navigate to the Supplier Orders worksheet on the other browser tab.
For the same product, click the Discontinue Supplier action.
To confirm, click Discontinue Supplier.
To confirm, click Remove Pending Supplier Orders.
To confirm the Delete action, click Delete again.
After the app syncs the data to the backend, to verify that the pending supplier orders for the Spice Rack product have been deleted, navigate to the Supplier Orders worksheet on the other browser tab. Also, verify that the Supplier ID in the Products worksheet has been removed for the same product.
For more information about AppSheet actions, see the Actions: The Essentials documentation.
To add functionality to your app, you have successfully used some of the different types of actions that are supported in AppSheet.
In this lab you learned how to:
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one