
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
Price and Tax columns are updated
/ 25
Set the initial value of the new product
/ 25
Use the change and content column types
/ 25
In this lab, you use various data features that are provided by AppSheet in your app. These features are:
You use these features to implement your app's functionality while preserving the validity, consistency, and integrity of the data used by the app.
In this lab, you learn how to perform the following tasks:
Starting with a Google sheet as a data source, use the AppSheet UI to create an app to manage a list of products and their inventory.
Preview the app's functionality in the live preview feature of the AppSheet UI.
Implement the data-related features listed above in your app.
Build app column formulas with expressions and AppSheet's built-in functions.
Use some of the Change and Content AppSheet column types in your app.
Use column constraints to implement data validation in your app.
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:
Access to a standard internet browser (Chrome browser recommended).
Time to complete the lab.
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.
In this task, you create a new app by using the AppSheet UI to connect to a data source.
To create an app, in the AppSheet UI, click +Create > App > Start with existing data.
In the Create a new app dialog, for App name, type Inventory Manager.
For Category, select Inventory Management from the list.
Click Choose your data.
In the Select data source dialog, select Google Sheets.
In the file picker, select the products spreadsheet from your My Drive folder on Google Drive, and click Select.
This sheet was automatically provisioned for the lab.
AppSheet creates the app and displays it in the AppSheet editor UI.
Click Customize your app.
You are now in the AppSheet editor UI. The UI also provides a live preview of the app running in an emulator, which you can use to test the app's functions.
Click Check my progress to verify the objective.
AppSheet has created your new app and connected it to the products spreadsheet that provides data for the app.
AppSheet creates your app with default table configuration. In this task, you add tables to your app and update their configuration in the app editor.
In the AppSheet UI, in the left navigation bar, click Data (). The previously added Products () table is listed.
In the Products panel, click View data source.
AppSheet opens the Products sheet from Google Drive in a separate browser tab.
To review the contents of each tab in the sheet, click the sheet name at the bottom of the workbook.
To add the Product Categories table to the app, in the left navigation bar, click Data (), and click Add new data (+).
All products in the app belong to a product category. The Product Categories table contains information about each category.
In the Add data dialog, click Google Sheets.
In the file picker, select the products sheet from the My Drive folder, and click Select.
In the Create a new table dialog, for Worksheet Name/Qualifier, select Product Categories.
Leave the default authorization settings for updates, adds and deletes, and click Add This Table.
AppSheet adds the table to your app.
Repeat the previous steps to add the Shipping, Receiving and Suppliers tables to the app.
These sheets contain information about product shipments, receipts, and suppliers.
When a table is added to your app, AppSheet uses default configuration for the table's columns that might need to be updated. Because products belong to a product category, the Products table and the Product Categories table are related. Use the Ref column type to configure this relationship in AppSheet.
In the AppSheet UI, in the left navigation bar, click Data (), and then click Products ().
An expanded view of the Products table is displayed.
To edit the column definition, click Edit () next to the Product Category column.
To change the type of the Product Category column, for Type, select Ref.
For Source table, select the Product Categories table.
In the column definition form, click Done.
Repeat the previous steps to edit the Supplier ID column definition:
a. For Type, select Ref.
b. For Source table, select the Suppliers table.
In the column definition form, click Done.
In the properties of the Product ID column, clear the Show and Search checkboxes.
This step prevents the display and search of the key column of the Products table in the app.
Change the Type of the column: Lead Time (days) to: Number.
Change the Type of the column: Current Inventory to: Number.
Click Save.
Because shipping transactions in this table are for specific products, the Shipping and Products tables are related via the Product ID column. The same relationship exists between the Receiving and Products tables.
In the AppSheet UI, in the left navigation bar, click Data (), and then click Shipping ().
An expanded view of the Shipping table is displayed.
In the Product ID column definition form for Type, select Ref.
For Source table, select the Products table.
In the column definition form, click Done.
Click Save.
Repeat the previous steps to change the type of the Product ID column in the Receiving table to Ref.
Click Save.
In the AppSheet UI, in the left navigation bar, click Data (), and then click Suppliers ().
An expanded view of the Suppliers table is displayed.
Clear the Label checkbox of the _ComputedName column.
Select the Label checkbox of the Supplier Name column.
The Label property tells AppSheet which column to use when displaying a row of data in the app.
Click Save.
The Inventory Manager app is a live, functional prototype that is connected to the various datasheets on Google Drive.
In this task, you create and update views in the editor to enable your app users to browser and edit data via the app.
To view the data from the Product Categories table as a gallery of images, create the Categories view.
In the AppSheet UI, in the left navigation bar, click App () > Views ().
To add a new view in the Inventory Manager app, click +.
Click Create a new view.
In the New View form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Categories |
For this data |
Product Categories |
View type |
gallery |
Position |
first |
Click Save.
The app preview now displays the data from the Product Categories table in an easy to view gallery format.
Click any of the product category images to view more details about that category.
Repeat the previous steps to create a view for the Shipping table.
In the New View form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Shipping |
For this data |
Shipping |
View type |
table |
Position |
ref |
Click Save.
Repeat the previous steps to create a view for the Receiving table.
In the New View form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Receiving |
For this data |
Receiving |
View type |
table |
Position |
ref |
Click Save.
Create a dashboard view to contain the Shipping and Receiving views that were created in the previous task.
In the AppSheet UI, in the left navigation bar, click App () > Views ().
Click + Add View.
Then click Create a new view.
In the New View form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Ship/Recv |
View type |
dashboard |
Position |
last |
For View entries, click Add, and then select the Shipping view that was created in the previous task.
Click Add again, and then select the Receiving view that was created in the previous task.
Enable Use tabs in mobile view.
Click Save.
Create this view and provide access to it via the app's main menu.
On the same App () > Views () tab, click + Add View.
Then click Create a new view.
In the New View form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Suppliers |
For this data |
Suppliers |
View type |
Card |
Position |
menu |
In the View Options section, customize the card layout:
Click Save.
AppSheet by default creates a view of type Map based on the data in the tables used by your app. Because you created a separate Suppliers view, you do not need the default map view in the app.
On the App () > Views () tab under Primary Navigation, select the Map view to expand its definition.
Click More (), and then click Delete.
Click Save.
In the app preview, access each view created in the previous tasks to view the data from their corresponding tables.
In this task, you use app formulas to add functionality to your app. You also set initial value expressions for some of the columns in your app.
You can use worksheet formulas with AppSheet. When your app reads data from the sheet, AppSheet computes the formula values. When data is updated in the app and synced back to the sheet, the formulas are computed again.
To create a formula in the Products worksheet, in the AppSheet UI, in the left navigation bar, click Data () > Products ().
An expanded view of the Products table is displayed. Click View data source.
The spreadsheet opens in a separate browser tab.
Select the Price column in the sheet.
To add a new column to the sheet, on the Insert menu at the top of the worksheet, click Columns > Insert 1 column right.
In the header row, type a name for the new column: Tax
This column will contain the sales tax amount for each product whose value will be computed using a worksheet formula.
Click into the cell F2 in the first data row of this column, and type (include the = sign):
=E2*0.05
This sets the tax amount to be 5% of the product's price.
Click Enter in the cell.
To use the same formula in the remaining cells of this column, select the Auto fill checkbox.
With the new column added to your worksheet, you must now update your app's data structure to use the new column.
In the AppSheet UI, in the left navigation bar, click Data () > Products ().
Click Regenerate schema ().
Click Regenerate.
AppSheet regenerates the column structure for the Products table, and resyncs the app in the live preview. Ignore any warnings that may appear in the AppSheet editor.
In the app preview, select any of the products to view details of the product.
The newly added Tax column is displayed.
Click Edit () to edit the product information.
Update the price of the product in the app, and click Save.
To sync the price change to the backend, click Sync () in the app preview, or wait a few seconds for the app to automatically update the changed data.
After the sync process or the automatic update completes, the value in the Tax column in the app is updated based on the spreadsheet formula.
Return to the Products worksheet on the other browser tab. Verify that the Price and Tax column values for the product are updated.
Click Check my progress to verify the objective.
An app formula is an AppSheet expression that is evaluated whenever an app user changes a value in a form either while creating a new row or editing an existing row of a table.
You can use an app formula to compute the value for specific columns in your app. In this task, you add a virtual column in the app to display the total price of a product in the app. The value in this column will be computed using an app formula.
In the AppSheet UI, in the left navigation bar, click Data () > Products ().
This expands the Products table definition, and click (+) Add virtual column.
In the New Virtual Column form, for Column name, type Total Price.
To open the Expression Assistant, click anywhere in the App formula field.
In the expression field, type [Price] + [Tax].
In the Expression Assistant, click Save.
In the form, click Done.
Click Save.
Select a product in the app preview to view its details, and note the value displayed for the Total Price column.
Edit the selected product, and change its price to a different value.
Click Save.
After the changes are saved, the product details view displays the updated Total Price value for the product using the app formula defined earlier.
An initial value expression is used to assign an initial or default value for a column when a new entry is created via the app.
In this task, you set the initial value of a column in the Products table.
In the AppSheet UI, in the left navigation bar, click Data () > Products ().
To open the Expression Assistant, click into the INITIAL VALUE field of the column Product ID.
This is the key column of the table that contains the UNIQUEID() built-in AppSheet function. This function generates a random string that is used as a unique identifier within the app.
In the Expression Assistant, open the Text tab.
Find the example that uses the CONCATENATE(text-value1, [text-value2, ...]) function, and click Insert.
This inserts a sample expression in the expression field.
Edit the expression to concatenate the Product Name column value, a hyphen, and the UNIQUEID() function:
This expression uses AppSheet's built-in CONCATENATE function to generate a string that contains the value of the Product Name column from the current row in the Products table concatenated with a hyphen character and a unique random value.
In the Expression Assistant, click Save.
Click Save.
Test the initial value configuration created in the previous task by adding a new product via the app.
To download a product image, click the following link and save the file to your computer: Picture frame
You will use this image when creating a new product via the app in the following steps.
In the app preview, click Add .
In the New Product form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
Product Name |
Picture Frames |
Product Category |
Home Décor |
Price |
5 |
Lead Time (days) |
2 |
Minimum Acceptable Inventory |
10 |
Minimum Shipment Quantity |
1 |
Supplier ID |
Kitchen Source |
Click the image icon in the app preview to upload an image for the new product. Use the image that you downloaded previously.
To create the new product, in the app preview, click Save.
To sync the price change to the backend, click Sync () in the app preview, or wait a few seconds for the app to automatically update the changed data.
After the app has updated the backend, navigate to the Products worksheet on the other browser tab.
To find the newly added Picture Frames product, scroll through the list of products in the sheet.
Verify that the value stored in the Product ID column matches the value generated by the initial value configuration that you defined in the app.
To find the new Picture Frames product, in the app preview, click Products in the bottom navigation bar and scroll through the list of products.
Click Check my progress to verify the objective.
AppSheet supports many different column types for use in your app. In this task, you use some of these types to add functionality to your app.
Change column types are used to track changes to the data used by your app. ChangeTimestamp is one such type that is used to record a timestamp whenever the value in a table's column changes.
Navigate to the Products worksheet on your browser tab.
To store the date when a product's price is updated, in the header row at the top of the worksheet, add a new column: Price Updated
In the AppSheet UI, in the left navigation bar, click Data () > Products (), this expands the Products table definition.
Click Regenerate Schema (), and click Regenerate again to confirm.
AppSheet regenerates the data structure for your app. Ignore any warnings that may appear in the AppSheet editor.
To edit the definition of the Price Updated table column, click Edit ().
Change the column's data type: For Type, select ChangeTimestamp.
Under Type Details for Columns to watch for changes, click Add, and select the Price column.
Click Done in the column definition form.
Click Save.
To test your changes, modify the price of any product in the app preview and save the change.
After the changes are synced to the backend, verify that the Price Updated column in the Products worksheet is updated with the current date and time.
To read more about Change column types, view the Track changes using Change column types documentation.
Content column types contain values that are shown as inline content in the app or open in an external content viewer. Image and Thumbnail are two examples of Content column types. To use a file or PDF in your app, use the File column type.
Navigate to the Products worksheet on your browser tab.
In the header row at the top of the worksheet, add a new column: Datasheet
This column will contain a URL or path to a datasheet file for a product.
In the AppSheet UI, in the left navigation bar, click Data () > Products (), this expands the Products table definition.
Click Regenerate Schema (), and click Regenerate again to confirm.
AppSheet regenerates the data structure for your app. Ignore any warnings that may appear in the AppSheet editor.
Next to the Datasheet column, click Edit ().
Change the column's type: For Type, select File.
In the column definition form, click Done.
Click Save.
To download a sample PDF document, click the following link and save the file to your computer: Product Datasheet - Sample PDF
Edit any product in the AppSheet app preview.
In the edit form, scroll to the Datasheet field, and click the file icon.
In the file picker, select the previously downloaded datasheet file, and click Save.
Save the product changes in the app preview.
After the changes are synced to the backend, verify that the Datasheet column in the Products worksheet is updated with the path to the file on Drive.
In the app preview in the product details view, scroll to the Datasheet column and click the name of the uploaded file.
A new browser tab displays the contents of the file.
The Signature column type is a content column type that is used to capture a user signature that is stored as a small inline image in the data source.
Switch to the Receiving worksheet in the other browser tab.
At the top of the worksheet, add a new column in the header row: Member Signature
In the AppSheet UI, in the left navigation bar, click Data () > Receiving (), this expands the Receiving table definition.
Click Regenerate Schema (), and click Regenerate again to confirm.
AppSheet regenerates the data structure for your app. Ignore any warnings that may appear in the AppSheet editor.
In the app preview, in the bottom navigation bar, click Ship/Recv.
Click the Receiving tab.
Click on any of the transaction rows in the table, and then click Edit ().
To unlock the touch pad for editing, click anywhere in the Member Signature field.
Draw your signature, and click Save.
After the changes are synced to the backend, verify that the Member Signature column in the Receiving worksheet is updated with the path to an image file on Google Drive that contains the signature.
The signature is also displayed in the app preview in the receiving transaction details view.
To read more about AppSheet column types, view the Column data types documentation.
Click Check my progress to verify the objective.
A slice is a subset of the rows, columns, and actions of a table. You typically use slices when you want to create a App view of part of a table in your app.
In this task, you create a slice of the Products table that contains products that are low on inventory. You also create a App view to view the data from the slice.
In the AppSheet UI, in the left navigation bar, click Data () > Products (), and click Add slice to filter data.
Click Create a new slice for Products.
In the New Slice form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
Slice Name |
Low Inventory |
Source Table |
Products |
Slice Columns |
All Columns |
Update mode |
Updates |
To open the Expression Assistant, for Row filter condition, click into the field and select Create a custom expression.
In the Expression Assistant for Row filter for slice Low Inventory (Yes/No), type: [Current Inventory]<[Minimum Acceptable Inventory]
In the Expression Assistant, click Save.
Click Save.
Now that you created the slice, you can use it in a view to display the data from the slice.
In the AppSheet UI, in the left navigation bar, click App () > Views ().
Click + Add View.
Then click Create a new view.
In the New View form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Low Inventory |
For this data |
Low Inventory |
View type |
deck |
Position |
menu |
Click Save.
In the app preview, navigate to the app's main menu.
Click the Low Inventory menu item.
The Low Inventory view displayed in the app contains a subset of the products that are low on inventory.
Click on any of the products to view its details and verify the row filter condition that was used in the slice definition.
In AppSheet, you can use constraints to control the display and usage of table column data and to implement data validation in your app.
In this task, you create a constraint to control the visibility of columns in the Product Categories table and implement data validation in your app.
The Aisle and Shelf columns contain the aisle and shelf numbers of a warehouse where the products of a specific category are stored. In this task, you conditionally display the Shelf column of a product category in the app.
In the AppSheet UI, in the left navigation bar, click Data () > Product Categories (), this expand the Product Categories table column definition.
Edit the Shelf column definition.
Click the Expression Assistant filter icon next to the Show property, and click in the field to open the assistant.
In the Expression Assistant form, select the Yes/No tab.
Scroll through the list of examples to find the ISBLANK(value-or-list) entry, and click Insert.
Edit the expression field to wrap the ISBLANK function with the NOT conditional operator, and replace the [Shelf] column with [Aisle]:
In the Expression Assistant, click Save.
In the column definition form, click Done.
Click Save.
To validate data input via the app, you create a Valid_If constraint for each column of a table that is used by the app.
In the AppSheet editor, to ensure the value entered for the Aisle column is numeric, edit its column definition.
In the column definition form, expand the Data Validity section.
Click into the Valid If field to launch the Expression Assistant.
In the Valid_If formula expression, type:
The app assumes that there are 50 aisles (maximum) in the warehouse that are numbered from 1 through 50.
In the Expression Assistant, click Save.
In the column definition form for the Aisle column under Data Validity, click into the Invalid value error field.
You use this field to provide an error message to the app user when the typed value for the Aisle column is out of range.
In the error message expression field, type:
In the Expression Assistant, click Save.
To make the Aisle column optional when creating a new product category via the app, in the column definition form, clear the Require checkbox.
In the column definition form, click Done.
Click Save .
To display the product categories, in the app preview, click Categories in the bottom navigation bar.
Click the Holiday product category to view its details.
The Aisle and Shelf column values are not displayed for this product category because the Aisle column is empty in the sheet.
Even though the Shelf column is non-empty, the Show_If constraint prevents it from being displayed in the app.
To edit the Holiday product category, click Edit ().
For Aisle, click the minus (-) sign to decrease the number to -1.
The invalid error message is displayed in the app.
For Aisle, type 51.
The invalid error message is again displayed in the app.
For Aisle, type 5, and for Shelf, type 9X.
Click Save.
The product category details page is displayed with the valid values as entered.
View the Product Categories worksheet on a separate browser tab. After the app syncs the data, the valid values are updated in the sheet.
You have successfully used some of AppSheet's data features in your app 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