2.7 - Test the Overdue Book Mail Merge
Last updated 13/06/2023
We have completed adding the automated Overdue Book mail merge, so now would be a great time to run the Book Club application and test how it works. We will use two member accounts to demonstrate this.Currently, we have a clause in our SQL that specifies a book needs to be overdue by 30 days before an overdue email is sent. We are going to edit this temporarily just so we can see the Overdue Book email now and not in thirty days time.
We will also need to log into the Book Club application as the Admin user and change the email for the user Cody so that he has your email, this way you will be able to see the email sent out.
Important
Remember that we set the email to run every minute, so you may need to wait a short time until you see the overdue email come through.
Navigate to Functions
1. Select Logic in the menu.2. Select Code Editor in the sub-menu.
Figure 1 - Code Editor menu item
Edit the OverdueBooKAlert Function
1. Click the Open Existing Function button.Figure 2 - Open Existing Function button
2. Click the lookup icon in the Code field and select OverdueBookAlert.
Figure 3 - OverdueBookAlert function
3. Delete DaysBorrowed > 30 AND.
Figure 4 - Delete DaysBorrowed > 30 AND code
4. Click the Save Current Tab button.
Figure 5 - Save Current Tab button
Run the Book Club Application
1. Click the Run button in the toolbar.Figure 6 - Run button
Log in With the Admin User
1. Type admin in the Username field.2. Type Demo123! in the Password field.
3. Click the Sign In button.
Figure 7 - Sign in as the Admin user
4. Click Administration Menu in the menu.
Figure 8 - Administration Menu menu item
5. Click Users in the menu.
6. Select the cody record in the list.
7. Either click the Edit button in the form app bar, or click directly in the Email field.
8. Delete the current email and type your email.
Figure 9 - Edit the cody record
9. Click the Save button in the form app bar.
Figure 10 - Save the cody record
10. Click the Avatar button.
11. Click the Logout button.
Figure 11 - Logout as the Admin user
Sign in With the Member Cody
1. Type cody in the Username field.2. Type Demo123! in the Password field.
3. Click the Sign In button.
Figure 12 - Sign in as the member Cody
4. Click Find Books in the menu.
Figure 13 - Find Books menu item
5. Type Eliz in the Title field.
6. Click the SEARCH button.
Figure 14 - Search for a book
7. Click the REQUEST BOOK button for the Elizabeth Taylor record.
Figure 15 - Request the Elizabth Taylor book
8. Click the Avatar button.
9. Click the Logout button.
Figure 16 - Logout as the member Cody
Sign In With the Member Jason
1. Type jason in the Username field.2. Type Demo123! in the Password field.
3. Click the Sign In button.
Figure 17 - Sign in as the member Jason
4. Select the Elizabeth record in the list.
5. Either click the Edit button in the form app bar, or click directly in the Borrowed By field.
6. Click the lookup icon in the Borrowed By field and select cody.
7. Click the Save button in the form app bar.
Figure 18 - Edit the Elizabeth Taylor book record
info
Wait a minute and you will receive the overdue email.
Figure 19 - Overdue email
tip
If you want to keep this app for reference, add the deleted code back into the OverdueBookAlert function and change the job to be once a day at 2am to avoid the emails coming through every minute!