Table of Contents

Display a Message When a Deadline is Approaching

Lesley Updated by Lesley

This article will discuss using page rules to show a message in the Live App when a date/time is approaching.

Scenario

Your app contains records from your database that have a specific date/time. You want users to be notified of an upcoming event with a message in the Live App.

Example:

A project management app displays a list of upcoming milestones. Your app will display a message to your employee when a deadline is approaching.

Requirements

This recipe will use page rules to show a warning message based on a date/time value. You will need a table that has a date/time field in order to add a page rule to create the message.

You can read more about page rules and date/time fields here.

Steps

Select the Page That Will Show the Message

In the Pages section of the Builder, select the page that contains your project deadline where you want to display a message.

If you need to create a new page, you can read more on creating and managing pages here.
Add a Project Details View

After you have selected your page in the Pages section of the Builder, you will want to add a details view that will display information about the Project.

Click the "+ Add View" button and select a details view type to add to the page. In this scenario, we are adding a details view displaying a Project record.

Your page will now contain the Project details view:

You can read more about using details views here.

Add a Page Rule to Display a Message based on a Date/Time Field

Now that you have a page and details view set up in the Pages section of your Builder, we need to add a page rule.

Where to Add a Page Rule

From your project details page in the Pages section of the Builder, navigate to the Rules tab in the top navigation and click “Add rule”:

Properties for Page Rules

After you click “Add rule”, several properties will appear for you to fill in. This is where you tell your live app what to display based on a record value.

The page rule should have the following properties:

  • When the following criteria is true: Start date is during the next 7 days
  • Run the following action: Show a message
  • Message to show: Add a custom message
  • Type: Set type to Warning

You can read more about adding and managing page rules here.

Login & Test

Now that you have set up your page to display a message you can view this page in your Live App. While viewing your page in the Pages section of the Builder, click the open icon or the "Go to Live App" button. This will open your Live App in a new window. :

If the start date of this record is during the next 7 days, your message should appear at the top of your details view

Optional Features

You can add additional rules to your project details, to display different messages based on how soon the deadline is.

Click the green “+ Add Rule” button to add an additional rule, and define the parameters to reflect the behavior you would like in this rule.

For example, we can add a red alert message that contains bold formatted text, which will appear when the start date is set to today. We can also check a box that allows the user to close or ignore the message.

In your Live App, you will see that if the start date is today, your red alert message should appear at the top of your details view:

Find out more about how Page Rules can enhance your app's functionality. 

How did we do?

Start an Auto Increment Field from Any Number

Generate Simple Numeric Barcodes Automatically

Contact