Unit 8: Working with Actions

Questions Covered •

What are actions?



How are actions triggered?



Where can we access actions to create or edit them?



How do we automate the sending of email notifications?



How do we automatically update fields when some condition is met?



How do we manage sets of conditional actions?

2

Simple Actions Overview •

Actions can be triggered by rules and action buttons within a table. Since rule design is a complex subject, we are going to introduce actions first in the simpler context of an action button.



There are currently 17+ potential action types (some require special setup for use, such as document comparison).



This unit covers the three most common: Update Fields, Email, and If-Then-Else actions.



We will learn about the attributes of the Action Button data type.



We will discuss and create email templates.



We will be creating two action buttons, each with a variety of actions. 3

What is an Action? •

Actions perform the automation for the system, sending predefined emails, updating records, importing/exporting records, creating attached files from print templates, etc.



Actions are triggered by rules (discussed in the next unit) or by action buttons within a table.



Actions are stored in an actions library for each table and once created are available for use by other rules and actions.

Available actions are shown in the Available Actions box and are moved to the Selected Actions box to make them active for this rule

4

Actions Covered in this Unit •

We will be discussing the three simple action types: 

Update Fields: Updates any field(s) in this table or a linked record with a value or formula. Can also be used to populate a linked field set based on the results of a saved search.



Email: Sends an email based on a saved email template.



If-Then-Else (the most commonly used): This is a container action that allows alternative criteria and their actions to be defined in a single action.

5

Naming Actions



It is important to name actions as clearly as possible, so other admin users can guess what that action is doing just from its name. This saves time when troubleshooting and documenting. We use the following syntax for the most common action types: 

Email action: Email [people] when [condition]: 



Update Field action: Set [field] to [value]: 



Examples: “Email customer acknowledgement when created,” “Email Assigned Person when Customer updates.”

Examples: “Set Status to Pending Customer,” “Set Assigned Team to Support Team.”

If-Then-Else action: [description of collection of conditions]: 

Examples: “All Create Actions,” “All Actions when Customer Updates.”

6

Action Button Data Type •

Like other fields, action buttons can be placed on the form layout or shown in the table view, both of which will perform the action on a single record.



Action buttons can also be placed on the table action bar, allowing you to run the action on multiple selected records at once.



In the Action Button field wizard, the Options, Permissions, and Display tabs are basically the same as for the other local fields you created in Unit 3.

7

Action Buttons and Permissions •

Action buttons are very useful, as they help users perform complex actions with a single click.



Action buttons can do things that users themselves can not do, such as changing the Status field to Cancelled when the user does not have permission to edit that field, creating records in another table, or generating emails.



This is because action buttons have “God-like” permissions - they act with admin level privileges. This makes it important to control who has view access to an action button field – if users can view the button for a record, they can generally execute it (with a few exceptions). Field edit permissions for action buttons are ignored since the button cannot be “edited.”

8

Action Buttons and Permissions (continued) •

The view permissions for the action button apply to both the record form and the table view, so if users have permission to view an action button for only their own records and they add the button to the table view, the button will only appear for the records they own.



Visibility dependencies are often used with action buttons to control when they can be pressed. These dependencies are also maintained in table views, so if the button is added to a view but is not currently available for some records due to a dependency not being met, it will not appear for those records.



There is a special permission on the Permissions tab of the field wizard for action buttons beneath the normal permissions:



If a group is not included here, then when a member is viewing a record for which they do not have record edit permission, all action buttons will be hidden. If the group is included here, they will see the action buttons for which they have view permissions and be able to execute them.

9

Action Buttons—The General Tab •

The General tab is where we define the action(s) that will occur when the action button is clicked.



On the General tab, we first define how the action button will be displayed: 

Text Hyperlink will display the action button with text:



Image Hyperlink will display the action button as an image: 



The images available are the same as those available within the Graphics tab of the Table wizard (Unit 1). If you would like to add an image to be used as your action button, you can upload a new image in the Graphics tab of the Table wizard.

Below the available graphics are two options for what to do Before executing actions. If the action button will be clicked while editing a record, some changes just made to the record will only be available to the actions of the action button if the record is saved before executing actions. Sometimes you need to save the record first and other times you don’t want to do that because saving will execute rules. Most field changes are stored in memory and can be used by actions without saving first, but some data types are not. It may take some trial and error to determine the best option here.

10

Action Buttons—The General Tab (continued) •

Next are action button options.



While action buttons are generally configured to execute actions, they can also be set up to preform the following tasks either in conjunction with, or instead of, any executed actions:





Execute ActiveX



Open a URL – for instance this is used in the Companies table to show a Google map based on the address



Make a Skype call



Create a note



Create an email – this brings up a pre-defined email template for a user to manually complete and send.

If defining the action button to execute actions, any number of actions may be selected via the Actions screen which appears after clicking Add Action.

11

Adding a Wait Point to Actions •

Sometimes a delay is needed between actions, provided by the Add Wait Point button:



Clicking the button inserts an item in the list of actions and allows a time period to be set:



This is useful if the action is creating records in another table either in the background or by bringing up a new record dialogue, and you want to wait until the record is saved before proceeding so that the refresh of the record you are editing includes any impact made by the new record(s). 12

Action Buttons—The General Tab (continued) •

Next are options for what happens After executing actions.



Just as when you had to decide whether or not to save the record before running your actions, it is important to decide whether or not to save your record afterward.



If the action button is making changes to the record during the editing process, it is best to save afterwards and confirm that any changes made by the button are saved to the record regardless of the user’s permissions or whether they decide to cancel or save. 

When saving the record, you are given the option to save the record (which will close the record), save and open for edit, or save and open for view only.



If saving and opening, you may define which tab the record will open to. This can be very useful in guiding the workflow process for users.

13

Action Buttons—Some Other Complexities •



Depending on their placement, action buttons can be executed from: 

Editing a record



Viewing a record



The table view (neither viewing nor editing a record)



The table action bar (acting on multiple records)

Because action buttons can be executed from different starting points, it is important to test every method by which an action button can be pressed and to take that into account when deciding whether the action button saves the record before and/or after executing the actions. If executing from any context other than editing a record, there is no need to save before executing the actions, and even if the field option says to save before, the system will not save the record. Likewise, there is no need to save afterwards either, unless you want to open the record after running the actions.

14

Practice

Let’s Create an Action Button •

From Tasks > Setup Tasks > Fields mouse over New and select the Action Button data type.



On the General tab, name your action button “Send Notes to Creator.” 

This action button will (1) set the Status of the task to “Pending Creator Feedback” and (2) send an email including the most recent working notes to the person who created the task advising them the task has been updated. We will first save the button with just the Update Fields action. Then we will edit it to add the Email action, so we can introduce each action type separately.



Select Text hyperlink and give the button the same name as the Field Label: “Send Notes to Creator.”



For Before executing actions: select Save record. In this case, we want to save the record first to be sure that the latest append-only notes added are sent in the email action; depending on your action, you may or may not want to save the record first.



Check the box under then which reads: Execute Actions and click Add Action.



This will bring up the Actions screen.

15

Practice

The Actions Screen •

The top of the actions screen presents the available action types.



The bottom of the screen contains the actions library we discussed earlier.

16

Update Field Actions •

Update Field actions are the powerhouse of automation and are used to: 

Populate a given field with a value based on standard text or a formula in order to: 

Assign records to the appropriate team.



Increment or decrement number fields.



Add or subtract time from date/time fields.



Change the status of a record when specific conditions are met.



Manage the process flow between related tables.



Populate a linked field based on search criteria.



Update records in a related table when some condition is met.

17

Practice

Create an Update Field Action •

Let’s create an Update Field action, and add it to our Send Notes to Creator action button.



From the Actions screen, click Create Update Fields.



On the General tab, name the action “Set Status to Pending Creator Feedback.”



Give the action a description.



On the Fields tab, we will select the fields we wish to update. 

In the top section, we can choose whether or not to update fields from a linked record. 

For instance, if we were to choose Created By links to People, we could update the person record of the Created By for the task record.



In this case, leave the top dropdown set to –Select one–



In the bottom section, we select the fields we wish to update.



Check the box next to Status as this is the field we will update.

18

Practice

Create an Update Field Action (continued) •

Navigate to the Values tab.



In this tab, we will define the value to put in the fields we have selected. 



Note that depending on the data type of the fields you have selected, you may update the field by using one of the following options: 

Standard text



A formula



Round robin assignment



Team leader of … team



Reimport source record matching



Use a saved search



Delete

In this case, next to Status, select Pending Creator Feedback from the drop down. 19

Practice

Create an Update Field Action (continued) •

The Errors tab allows you to either prevent a record change or to ignore the error. 

Here, leave the default value of Prevent record save and click Finish.



You will be returned to the Actions screen where the action you just created will be highlighted within the list of Available Actions.



Scroll to the top or bottom of the window and click Finish to add the action and return to the Action Button field wizard, and when it refreshes, you will see the new action listed in the Execute Actions section.

20

Practice

Completing the Action Button •

Scroll down to After executing actions and select Save Record.



Navigate to the Display tab.



Under both When editing this field, show and When viewing this field, show select Neither the label nor the instruction. We always hide the field labels when creating action buttons since they generally just repeat the wording of the button.

You can justify the button with the other field labels or with the other field input boxes. Clicking the button to left justify it moves it to align with the field labels.



Click Finish to save your action button.



Next we will learn how to create Email actions, and then we will add an Email action to our action button.

21

Email Actions •

Email actions automatically send an email based on an email template.



The emails can be addressed to multiple recipients who may be selected based on the User, Team, or Email fields in the record – or they may be addressed to specific, hard-coded email addresses.



Emails can contain specified fields from the record, attachments, and multiple hyperlinks which will allow the recipient to login and either edit or view the record.



Emails can be sent in either html or plain text format.



When an Email action is run on several records, the results can be collated into a single email containing all of the relevant records, or individual emails can be sent.



Emails sent to a team are sent to the individual members of that team, using the permissions of each individual.

22

Email Templates •

Before we can complete an Email action, we must first configure an email template.



Email templates define the recipients, attachments to be included, hyperlinks to be embedded, and any fields from the relevant record which will be appended to the end of the email or included as an attachment.

Use the Insert drop down to attach a file, select fields to include, or insert a hyperlink Choose the recipient(s) by checking a box and selecting a field, team, user, or fixed address

Click Formula Help to insert field content into the email body or subject line using a variable such as $full_name Type the subject and body of the email using the HTML editor if desired

23

Accessing Email Templates •

Stored email templates can be accessed a few different ways. 

From the Message tab of the Email/SMS action wizard.



By mousing over the Email icon in a table action bar and selecting Manage Templates.



You may want to follow the discussion by going back to the Tasks table, mousing over the Email icon, clicking Manage Templates, and then clicking New to bring up the Edit Email Template wizard.



From Setup > Email > Go to Rule/Workflow Emails button, then choosing the appropriate table:

24

Edit Email Template—Main Screen •

From: Defines the email address displayed to the recipient as the sender.



Reply-to: Defines where the email will be delivered if the recipient replies to the email.



To/CC/BCC: Defines who the email will be sent to. 



This can be based on a specific user or team, or defined by user/email fields within the record.

Formula Help: Using this button, we can insert fields from the record into the body and subject fields of the email. 

For example, if we want the subject to include the contract title, we will include the variable $contract_title in the subject, or if we want to address the recipient by name we will include the variable $formula(assigned_person) in the body of the email. Fields inserted into the body are inserted into “$formula(field name)“ so that punctuation does not affect the parsing of the field name.



HTML/Source HTML/Plain Text: Toggles between different text formats in the editor.



Attachments: Defines any hard-coded files you wish to attach to the email.



Fields Included: Displays the fields that have been selected for inclusion.

25

Edit Email Template—Insert Menu •

Within the Insert drop-down in the email template, the following options are available:



Variables: Brings up the same menu as the Formula Help button.



Populate From Template: Will populate the email template as a copy of another, existing email template.



Message to Import: Will insert the text from the body of another, existing email at the location of the cursor in the body of the email template.



Fields from [Table]: This option allows you to include fields from the table generating the email. If fields are included, they can be displayed as inline text or as an attachment. You can choose to include All Fields (limited to the permissions of the sender), All Fields Based on Recipients Permissions, or Selected Fields.



Include a Hyperlink to Edit the [Table]: Brings up the Hyperlink wizard, which generates a hyperlink the recipient can use to login and view or edit the record directly. There are options for where the recipient will go when the hyperlink is clicked, including editing the record, viewing the record, or setting some fields and being redirected to another URL. Whether the user is asked for a login and/or password when clicking the link is defined in Setup > Access > Configure Hotlinks.

26

Edit Email Template—Options Tab •

The Options tab of the Edit Email Template wizard contains some less commonly edited options. Each of these options is set by default for individual email templates based on the Outbound Email Setup selections.



Including the encrypted ID in the subject line allows replies to the email to update the record from which it was sent. It can be changed for an individual email template here if needed.



Enable field parsing can be turned off for specific email templates here. Turning it on here without turning it on in the outbound setup will have no effect.



Include Hidden Code can be changed here from the default value as well.

27

Edit Email Template—Heading Tab •

The Heading tab is used to give the email template a Name and Description. The Template Name is shown in the default table view for email templates.



It also allows you to publish a template so that other users can see it on the drop-down under the Email icon, so they can easily send the email manually.



In order for the template to appear to a user in the dropdown list, it must have a Yes in the Published field and must be active for one of their teams.



When setting group permissions, the Menu-Specific tab controls whether groups have access to their own, published, or all email templates, so it is important to mark templates that should be available to users as published.

28

Practice

Create an Email Action and Template •

Now let’s add an Email action to the action button we just created to notify the person who created the task that it has been updated.



Go to Tasks > Setup Tasks > Fields > and edit the Send Notes to Creator field.



In the Execute Actions section, click the Add Action button and click Create Email/SMS Action. This will bring you to the Email/SMS action wizard.



On the General tab, name your action “Email Notes to Creator” and add a description. 

Under Choose delivery type select Send Email.



On the Message tab, you will see an empty table of email templates available to the Tasks table.



Click New. This will bring up the Edit Email Template wizard.



Click on the text No Recipients selected and select User Fields. Click the lookup and select Created By. This will instruct the template to send the email to the email address associated with the user who created the task.

29

Practice

Create an Email Action and Template (continued) •

In the Subject box, type: “Your task $id has been updated by”. This will insert the ID number.



Click Formula Help. This will bring up the Formula wizard showing the fields and global variables that can be used within the email.



On the Fields tab, click Updated By (you can click on the label or the variable name to its right). This will select the field for insertion.



On the Confirm popup window, select Subject Line to add this variable to the end of the subject of the email.



Click Formula Help again and add the fields Created By, Task Summary, and Working Notes Latest one at a time. To prevent each field from being replaced by the next one, make sure you click on the email body to move the cursor off the field name before trying to add another.



On the Confirm popup window, select Email Body to add the variables to the body of the email.



Rearrange them so that the text reads: $formula($_1880_full_name), The task: $formula($task_summary) has been updated. The latest working notes are: $formula($working_notes_latest) Please click here to view the record.

30

Practice

Create an Email Action and Template (continued) •

Highlight the word “here” and click Insert > Include a hyperlink to edit the task.



This brings up the Hyperlink wizard. 

Please review the different options within the wizard, which can define whether the hyperlink opens the record in view or edit mode, where the user is redirected when they have finished editing the record, and the window of time that the hyperlink is active .



Select View ticket if user clicks hyperlink.



Click Finish.



Click Insert > Fields from Task.



Under Include Fields from Task select Yes.



Under Include Fields select Selected Fields and choose Updated By, Date Due, Task Summary, Task Description, Status, and Working Notes. Click Finish.



Click the Heading tab.

31

Practice

Create an Email Action and Template (continued) •

Name the template “Email Notes to Creator.”



Give the template a description.



For Published, select Yes.



Make this Active for the Admin Team.



Click Finish to return to the Message tab of the Email action wizard.



Ensure the email template you just created is selected, and click Finish. This will return you to the Actions screen.



The Email/SMS action you just created will be selected. Scroll to the top or bottom to click Finish. This will bring you back to the Action Button field wizard, where you will now see both of the actions you created in the Execute Actions section.

32

Practice

Finishing and Testing the Action Button •

In the Execute Actions section: 

You can drag the actions up or down to reorder them as needed.



The checkboxes are not needed to run the actions – they are used to select an action to remove using the Remove button.



Click Finish to save the field.



Click the Layout tab and add the button to the layout below the Working Notes field.



Then click Copy this layout to the End User Layout so you have a task layout available for end users.



Click Finish to save the Table wizard.



Now test it by editing a record in which the creator has your email address, and clicking the button!



When you receive the email, click on the link to see how the task looks. Depending on what group the user was in, you may see only some fields.

33

Action Button Quick Review •

To review, creating an action button field is similar to other fields, with the exception of the General tab, where the actions are defined.



If the action you wish to use does not yet exist, it must be created.



If the action you wish to use is an Email/SMS action, and the template you wish to use does not yet exist, it must be created.



We will create another action button for additional practice. But first, let’s look at some ways to make configuring an action button easier where email is involved.

34

Making Email Templates Quicker and Easier •

Because it can become confusing when you are multiple layers deep in the system, it is convenient to set up your email templates in advance of setting up your actions.



As already mentioned, the email templates can be accessed from the table view, by mousing over the Email icon and selecting Manage Templates. Email templates can be created and edited from there.



Setting up your email templates in advance will make them available for you in actions and rules you create in the future.



From the Email Templates table, you can also copy an email template, then change only certain elements of the email, saving both time and effort. 35

Practice

Create Another Email Template •

Let’s create an email template for our next action button to notify the person who created the task that it has been completed.



Navigate to the Tasks table in the left pane, and click on Manage Templates as outlined on the previous slide. From the Email Templates table, click New.



Create the email below based on what you have learned in this unit. If you need more information, you may check the email templates in your Training Sample KB. Hint: the first variable is the field Created by.



Click the Heading tab to name the template “Email task creator that the task is Done.”

36

Copying to Create Email Templates •

It is often time-saving to copy an existing email template to create a new one, especially if you have selected several specific fields to be sent. 

On tables which send email to external customers, we often create an HTML formatted email template, with headings and our website look and feel and the set of fields to be included, then copy that template to create all other templates.



The Copy option is available on the Actions drop-down in the Email Templates table. Simply select an email template and click Copy:



A pop-up will appear which reads: “Are you sure you want to copy the selected Email Templates?” Click Finish.



A second pop-up will appear. Click Finish on this as well.



Be sure to click on the Heading tab to give the new template a name. 37

Practice

Copy to Create Another Email Template •

Let’s copy the template we just created to create a second email template which will be used by our next action button to notify everyone on the CC List in the task record that it has been completed. 

Note that if we wanted the wording of the email to be the same, we could have just added the CC List field to the recipients of the first email. In this case, we want different wording and we want different logic for when each email is sent, so we need two templates.



From the Email Templates table view, select the email template you just created, and click the Copy button to create the new template.



Click the Edit icon to update the new template so that it matches the email on the following slide.

38

Practice

Copy to Create Another Email Template (continued)



Note that you must change the wording a bit, as well as the To field on the email template.



After making changes to the To, Subject, and Body fields of the template, click Heading.



Name your template “Email CC list that the task is Done.”

39

Using an If-Then-Else Action in an Action Button •



Now we are going to create another action button that will run an If-Then-Else action. 

This action button will set the Status of the task to Done, set the Date Completed to Now, and set the Assigned Person to the user who clicks the action button (so if someone who was not yet assigned personally to the task completes it, they will be set as the Assigned Person).



The action button will also determine whether or not to send the two emails you created on the preceding slides based on who updated the task and whether there is anyone in the CC list for this task.

First we need to learn about If-Then-Else actions.

40

If-Then-Else Actions •

If-Then-Else actions are containers for other actions.



They provide a quick, GUI-based programming tool.



They allow an admin to define multiple “if” clauses, each of which can run a different action (of any type), when an “if” is found to be true.



Using If-Then-Else actions can greatly reduce the number of rules in the system by grouping similar actions together in a single rule where they can all be seen and maintained.



Multiple “ifs” can be embedded within each other and can be separated or combined by “and” and “or” operators. Each “if” uses the same search filters we covered in Unit 5, in any combination.



Examples: 

If Category = A, Assign to Team A, else if Category = B, assign to Team B, else Validate that Category is not Blank.



If Severity = Critical, Page Team Leader and email Assigned Team, else Email Assigned Team.

41

If-Then-Else Actions (continued) •

The Details tab of the If-Then-Else wizard is set up as in the below image:



As stated in the wizard, the buttons are context-sensitive and show which actions are allowed based on the cursor position. The image above shows the options available when beginning your If-Then-Else action.

42

“Gotchas” with If-Then-Else Actions •

Some things to watch out for when writing your If-Then-Else action. It is tricky to insert a new “if” above the first “if.” (But we’ll show you how to do it). You cannot move an “if” up to the top level. However, you can move actions up and down. It is best to think through your logic carefully before building it. It is a little tricky to figure out where to put your cursor in order to insert an “if” at the correct level. Until you are familiar with it, it is best to check the screen after each Add If to make sure it is where you want it. Searches within an If-Then-Else action will not find changes made by earlier actions within the same If-Then-Else action. 

For instance, suppose the first clause action sets the Assigned Person to John Smith, and a later “if” condition says “if the Assigned Person equals John Smith, then email John Smith that he has been assigned.” The second search will not find the record where John Smith was just assigned. Changes made by an if-then action are saved in memory and executed after all the if’s have been evaluated.

43

Practice

Create an Action Button—Mark as Completed •

Now we are going to create another action button field. Return to Tasks > Setup Tasks > Fields, then mouse over New, and click Action Button.



On the General tab, name your action button “Mark as Completed.”



Select Text hyperlink and give the button the same name as the Field Label: “Mark as Completed.”



For Before executing actions: select Save record.



Check the box under then which reads: Execute Actions and click Add Action to bring up the Actions screen.

44

Practice

Create an If-Then-Else Action •

Let’s create an If-Then-Else action, and use it to run all the actions for our “Mark as Completed” button.



From the Actions screen, click Create If-Then-Else Action.



On the General tab, name the action “Mark as Completed Actions.”



Give the action a description.



On the Details tab, click Add Action.



We are going to start by creating an Update Fields action to set some fields when the button is pressed.



This action will be run as part of the If-Then-Else action – remember that the If-Then-Else action is really a container for conditions and other actions.

45

Practice

Create an Update Field Action •

From the Actions screen, click Create Update Fields Action.



On the General tab, name the action “Set Fields when Completed.”



Give the action a description.



On the Fields tab, check the boxes next to Assigned Person, Date Completed, and Status, as these are the fields we will update.



On the Values tab, when we define how to update our fields, we will use both a formula and a variable.

46

Practice

Create an Update Field Action (continued) •

For Assigned Person, select the option to treat the above as a formula. 

Click Formula Help, navigate to the Global Variables tab, and select $global.my_full_name.



Reminder: Standard text (values) is used when we want to update the value to some static value; a variable will be used when we wish to use a dynamic value that is dependent on the record (Fields tab), the user making changes ( Global Variables tab), or a predefined function (Functions tab).



For Date Completed, select the option to treat the above as a formula, click Formula Help, and navigate to the Functions tab.



This tab will show you each of the available functions, their purpose, and a brief description.

47

Practice

Create an Update Field Action (continued) •

Click on the function titled NOW and click Close.



It is helpful to familiarize yourself with the available functions in Agiloft. NOW inserts the date/time, while TODAY inserts just the date.



For Status, select Done and click Finish. We will keep the default values on the Errors tab.



You will be returned to the Actions screen with the new action selected.



Click Finish at the top or bottom of the screen to return to the If-ThenElse action screen. You will now see the following:

48

Practice

Continue with If-Then-Else Action •

Select the first line, then click Add If.



Create a Simple filter: Creator Login does not equal (!=) variable $updater_login. (Why? We only want to email the creator when a task is completed if he/she wasn’t the one who clicked the action button.) Click Finish.



Back on the Details tab, select the “…” line, then click Add Action.



Click Create Email/SMS Action and name it Email task creator that task has been completed. On the Message tab, select the email that you created earlier addressed to the Creator. Click Finish to save the template and then click Finish again on the Action wizard. You will see:

49

Practice

Continue with If-Then-Else Action •

Back on the Details tab, select the line starting with “if”, then click Add If. 

Create a Simple filter which states that: CC List does not equal (!=) variable $null. Why? We only want to send an email if there is someone to send it to.



Click Finish twice. If your cursor was in one of the indented lines when you clicked Add If, the “if” condition will be indented and subsidiary. If that happens, select the row and click the Delete button and start over. Beware that deleting an “if” condition deletes everything indented beneath it. It looks like this:

50

Practice

Finishing If-Then-Else and Action Button •

Back on the Details tab, with your cursor on the “…” line, click Add Action. 

Click Create Email/SMS Action and name the new action “Email CC List that task has been completed.“ On the Message tab, select the email template that you created for this purpose.



Click Finish to return to the If-Then-Else wizard – your action is complete!



Click Finish again to return to the Actions screen.



Ensure that the If-Then-Else action you just created is selected, and scroll down to click Finish again to return to the Action Button field wizard.



Select the option to save the record after executing actions.

51

Practice

Finishing and Testing the Action Button •

On the Options tab, make the visibility of this action button conditional on the Status containing any of the values other than Done or Cancelled.



Remember to set the proper Display tab options: Under both When editing this field, show and When viewing this field, show select Neither the label nor the instruction.



Click Finish to complete your action button.



Add the field to the layout and do some testing to see how it works.



Be sure to test each of the conditions by setting up your test tasks appropriately. Have one task for which you are the creator and one with a different creator, and be sure you have an email address.



Check the Emails tab of the task to see which emails have been sent (remember there is a delay of a minute or two before they appear). Email actions triggered by action buttons do not appear in History, but changes to fields do appear there.

52

Reviewing our If-Then-Else Action



It is not always easy to read If-Then-Else actions when you first see them. You can click Add Comments to put text on any row of your screen for more user-friendly explanations.



The action we just created, in plain English, states: 

We will run the Update Fields action regardless of any conditions.



If the user who clicks the action button is not the user who created the task, we will email the task creator that the task is complete.



If there are any users listed in the CC List, we will email those users that the task is complete.

If neither of the “ifs” are true, then no emails will be sent when the button is pressed.

53

A Trick to Insert an If at the Top •

Sometimes you need to insert an “if” at the top of the action after you have added other actions. You cannot do it by putting your cursor in the top line.



In order to get an “if” to the top, you need to first get an action to the top row.



The procedure to follow is this: 

Click Add Action to select an action you want to run with the new If and save the action.



Select the action row, and click the Move Up button repeatedly until you move the action to the very top row.



With your cursor on the action row, click Add If. This puts the “if” right below the action. Enter your criteria and save.



Select the action and click Move Down to put it below the If row!

54

Simple Actions Summary and Conclusion •

We have learned how to: 

Create an Action Button



Create simple Update Field and Email/SMS actions



Create and copy email templates



Use If-Then-Else actions to organize other actions.

55