Skip to main content

Relative Period

Set up the Relative Period control to filter records by preset or custom date and time ranges.

Use Relative Period to filter records by a time period that moves with the current date or time. Offer preset choices such as This month or Last month. Add a custom range when the presets do not match the interval users need.

In the original examples, the ROE filter offers This month, Last month, Last 2 quarters, and Last year. The Schedule filter offers Next 2 hours, Next 6 hours, Next 24 hours, and Next week.


Add Relative Period to the form

In the form designer, find the Relative period tile in the controls panel. The original tile uses a clock and a curved arrow. Drag it into a section or container near the records it will filter.


Basic of the Relative Period field

Open the Content > Basic block and set the Title's text of this Relative Period control. For more information about Title for field control, please refer:

Set the Associated variable for this Relative Period control. When you add a new Relative Period control, a default variable will be generated automatically. You can click the Edit Button to change the name or click the Reset button to bind this Relative Period control to other existing variables. For more information, please refer:

Under Apply type, select Value change to update the associated variable as soon as the selection changes. Select Click on apply button and associate a button already on the page to wait for the user to apply the selection. Use the associated variable in the target date filter.


Choice options of Relative Period

Open Choice options. Choose presets from six time units: Year, Quarter, Month, Week, Day, and Hour. The Year group in the original example shows This year, Last year, Next year, Last 3 years, Next 3 years, Last 5 years, and Next 5 years. The example also shows Last 2 years. Use Clear all in a unit’s section to clear its selections.

To add a range, open the appropriate unit and select Add new range. Choose a direction and enter a quantity. For example, in Year, choose Last and enter 10 for Last 10 years. In Selected options, use the drag handle to change the order and the trash icon to remove a choice. The original illustration shows Last 3 years, This year, and Next quarter in one example, and Next year, Next 3 years, and Last 3 quarters in another.

The original Add new range direction menu. Next is selected, with Last and Previous also listed.

The original Add new range menu shows Next, Last, and Previous, with Next selected. Enter the quantity in the field to the right of the menu.

Note:

This: "Year", "Quarter", "Month","Week", "Day" or "Hour" refer to the complete time frame selected by the user, encompassing the present moment.

For example, if the current year is 2023, "this year" would include all of 2023.

Last: "Year", "Quarter", "Month","Week", "Day" or "Hour"refer to time periods preceding the current frame.

For instance, if the present year is 2023, 'Last 2 Years' would refer to 2021 and 2022, excluding the ongoing year (2023)."


Appearance of the Relative Period field

Open the Content > Appearance block to set the appearance and layout of this Relative Period control.

Layout: Set the layout of the choices to be displayed horizontal or vertical.

More/Less enabled: This feature is useful when dealing with content that can be expanded or collapsed. It allows users to reveal additional information or reduce content visibility as needed.

Dropdown enabled: This style is suitable when the list of options is long. It saves space on the form and only reveals the options when the user clicks on the dropdown.

Multiple: Support setting multiple selections.

Display Title: Choose display or hide the label of this control. For more information, please refer: Understand the title of field controls

Vertical Align: When Title Layout is set to horizontal, you can set the vertical alignment to Top, Center or Bottom.

Title Width: Set the Width for the title in PX , %, em, rem, vw, calc.

Dynamic Display Rules: When you set a dynamic display rules, it behaves differently based on specific conditions and rules.


Validation of the Relative Period field

Open the Content > Validation block to set the properties of this Relative Period control.

Readonly: Turn this ON will make this field control as view only status.

Custom Validation: Set the custom validation rules. An error message that will display under your field when specified conditions become true. It will allow you to add any number of rules for validating your field.


Action call of the Relative Period field

Open the Content > Action block to call a pre-defined action from the drop-down list. This action will be triggered once the value of this Relative Period field is changed.


Style the Relative Period control

Adjust how the Relative Period control and its option items look in the Style tab.

Option items

Open the Style > Option items block to set the styles of the field control.

  1. Space Between: Set the space between choices.

  2. Horizontal Offset: Changes the horizontal reference point by the amount of the offset.

  3. Gap between control and option label: Set the spacing between the Checkbox, and the text of option label.

  4. Item width: Set the width of the choice and control size of the checkbox.

  5. Items Alignment: Set the alignment of this Relative Period control as left, center or right.

  6. Normal / Active / Disabled: Set different styles for normal, active and disabled state of the Relative Period control. Styles below are supported to be set separately for normal, active and disabled state.

    • Background Color: Set background color of the checkbox.

    • Border Type: Select the type of border, choosing from none, solid, double, dotted, dashed, or grooved.

    • Width – Set the Width of the border.

    • Color: Set the color of the border.

    • Radius: Set the border radius to control corner roundness.

  7. Option Label: Set the style of the option label for the Relative Period control:

    • Typography: Set the typography options for the text of the option.

    • Color: Choose the text color of the option.

    • Background Color: Set background color of the option.


Style of title

Style the Title of field controls that are applicable to this control.


Advanced Settings

Set the Advanced options that are applicable to this control.

Preview a whole period at its boundaries. For example, on June 15, This month covers June 1 through June 30. Check records on both dates and one on July 1. If you use an Apply button or enable multiple selections, also check when the results update and which periods the results include.

Did this answer your question?