[MUSIC PLAYING]
CHRISTIAN SCHALK: Hello, and welcome back
to the Building with AppSheet series.
I'm Google Developer Advocate Christian Schalk.
And in this two-part episode, we will introduce AppSheet actions
and workflows.
Let's get started.
AppSheet actions and workflows control the overall behavior
of an application.
Specifically, actions are application operations
that involve UI, data, and/or third-party integrations.
They can be triggered directly by the user or via workflows.
Workflows provide rules for automatic or scheduled
execution of actions.
I'll have more on workflows in the second part of this video.
As mentioned, actions perform distinct operations
within an app.
The three types of actions are UI navigations,
which allows an app to show a new view within an app
or of another app or even a separate website.
Data changes, which perform data updates on the app data itself,
and third is external communications,
which sends information to an external party,
such as with an email, SMS message, or even a phone call.
Now, let's return to our task-tracking demo
app and build some actions.
So here we are with our demo app from before.
And if you recall, we had two tables--
essentially the Tasks and Owners tables.
And they were actually related to each other.
So here's the UI.
Essentially, we have the Owners table and the Tasks table.
So I'm going to go ahead and add a few actions
to this application here to improve
its overall functionality.
So to do that, I click on the Behavior tab here.
And then I'm going to go ahead and click on New Action.
And the default action that gets created is actually functional,
and I could actually have it running right now.
But what I'm going to do for this initial example
is I'm going to override this default behavior
and just have it go to a website, all right?
And it's basically good to go at this point.
I'm going to change one thing on it.
I'm going to select a Display overlay for the prominence.
And what this means is that it will
place the Action icon to be over in this region right here.
And so I click Save.
And now, we have our icon there.
Basically, it doesn't matter if I'm
viewing the entire table or a particular record.
It's always there, because it's not a world-level operation.
So I can click on it, and it will take us
to the AppSheet's web page.
So pretty straightforward stuff.
Let's go ahead and create a New Action.
And for this action, I'm going to go ahead and accept
the default behavior, but I am going to customize
a few little things on it.
I want to change the name just slightly.
That way, it renders better.
So here we go.
It's showing up here at the top.
I will add another column update.
So I'm going to add the due date.
And the value I want it to be is essentially five business work
days into the future.
So if you recall from an earlier video,
I used this same formula to just project it out
five days into the future or five work days into the future.
And that evaluates correctly.
And then now, I'm just going to tweak the UI a little bit.
And so in this case, I'm going to use this icon here,
which is essentially this little rollback icon.
Actually, that's it.
I have everything good to go.
So I'll click Save.
And then we just do a quick test to make sure everything
is working as we expected.
All right.
So now, we have our action at the top here.
And I can just go through a few records
and select a record that I might want to update.
So in this case, let's go ahead and change this record
to be from In Progress to set as Not Started.
And I've also updated the due date.
So pretty simple.
Let's create a New Action.
And this last action I'm going to add
is to essentially do a CSV dump of all
of the data in the Task table.
So as you can see, it's not a row-level action.
So all I have to do is select it.
It will set us up to do this operation.
And then it even gave us a good, or an appropriate, icon.
And all I'm going to do is just update the prominence,
so that it's going to do the overlay display.
And so that will place the icon in the lower right.
So I click Save.
And then it only shows, in this case,
in the full table view, which makes sense.
So I'll click on the icon.
And that will kick off a CSV download.
And there's our downloading file.
And now that it's finished, we have our downloaded file.
So there we go.
So you can see in just a few minutes,
I was able to create some very interesting
additional functionality to the task-tracking app using
actions.
This concludes the first part of the intro
to actions and workflows episode.
Be sure to check out the second part of the episode
where I'll go into a lot more detail on workflows.
For more info on AppSheet, Google Cloud,
and Google Workspace, check out the links in the description
below.
And for more videos like this, make
sure you subscribe to this series so you don't miss out.
As always, thanks for watching.
And stick around for the next video
to learn more about workflows.
[MUSIC PLAYING]