Altair® Panopticon

 

Action Date Range Picker

The Action Date Range Picker allows setting a date range (From Date and To Date) and triggering an action.

Whenever the Data Range Picker values are changed, the associated action is executed.

Adding Action Date Range Picker

  1. Draw a rectangle on the dashboard canvas to display the Parts dialog.

  1. Click the Action Date Range Picker icon in the General section of the Parts dialog.

The action control is displayed in the dashboard canvas. By default, it shows the current date range (parameters From Date and To Date) and the Set Range button.

  1. Select the newly added control and click Settings.

The Action Date Range Picker Settings dialog displays.

There are two Mode options for making defining settings for Action (i.e., Use Action) and Parameter (i.e., Set Parameter).

  1. If Set Parameter is selected, select the Target Dashboard. Otherwise, proceed to step 5.

The default is Current Dashboard. When copying the action control to another dashboard or workbook, the target dashboard is automatically set to the new dashboard instead of where it was originally located.

This populates the From and To drop-down lists of the parameters that are defined in the selected target dashboard. Proceed to step 6.

  1. If Use Action is selected, select an Action to be used by the control.

You can also either click the:

    • Edit button to modify the Action settings or

    • New button to create a new Action if needed, and then use that.

This populates the From and To drop-down lists of the parameters defined in the selected action.

  1. Select the parameters that will be used for the From and To dates range.

  1. Select the Orientation:

    • Horizontal

    • Vertical

 

  1. You may opt to set new From Label and To Label.

  2. Select whether to display both the date and time in the control in the Format drop-down.

The text of the date can be directly entered.

NOTE: The To date must be greater than the From date.

Click anywhere in the dashboard to apply the change.

In the Web client, aside from entering the value, you can also click on a date to bring up the date range picker and select a new one.

  1. Set the Range Limit of the dates by selecting the number of days. By default, the range limit is Not Restricted.

  1. NOTE: Selecting a shorter date range limit can help in having a faster response time.

  1. When a Range Limit has been set, the Range Limit Error box is enabled. It is mandatory to enter an error message to help in defining a better input to match the set limit. (Default: Out of range)

  1. For example: “The Range Limit is set to 30 days. Modify the To date within this limit.”

  1. Check the Auto Fire Quick Ranges box. This automatically updates the date ranges as you click in the drop-down in the Web client. Otherwise, you have to select a date range first in the drop-down and then click  to update.

  2. Check the Hide Button box for the action control to update the parameter whenever the value of the Date Range Picker changes.

  3. Check the Default to Today box. This allows the Action Date Picker to check the current value of the dashboard parameter. If is set to null/empty, an action is executed to update the parameter and trigger the loading of the parameterized data with today’s date.

  4. You can also opt to specify the following date range values:

    • Default Relative From Date or the start Date/Time

    • Default Relative To Date or the end Date/Time

This allows relative ranges (based on today’s date), by parsing the input text string.

This uses the following pattern:

SIGN UNIT NUMBER

Where:

  • Sign is either a ‘+’ or ‘-’

  • Number is any number

  • Unit which can be any of the following:

    • m - minute

    • H – hour

    • D – day

    • B – business day

    • M – month

    • Y – year

For example:

  • -5m - back 5 minutes from current time.

  • -1D – back 1 day from today.

  • +D – forward 1 day from today.

  • -1B – back 1 business day from today (ignore Saturday and Sunday).

  • +1B – forward 1 business day from today (ignore Saturday and Sunday).

  • -1M – back 1 month from today.

  • -1Y – back 1 year from today.

  • -7D – back 7 days from today.

  • -14D – back 14 days from today.

When these values are entered, the correct date should be selected, and then the data requests are executed based on this date.

 

The special now term can also be used, this represents the current Date/Time. For example:

    • Using now will set the date picker to the current Date/Time

    • now-7D will set the date picker to 7 days ago. This is the same as specifying -7D

For example:

In the Web Client, the From date will be now-7D and the To date will be now by default.

For example, now is November 28, it will go back 7 days (November 21) and then the date will be recalculated.

 

In addition, you can use the SIGN UNIT NUMBER pattern in the Web client to modify the relative date calculation.

For example, if you enter -1M:

 

The recalculated relative date will back 1 month from today (e.g., October 28):

Complex expressions can also be entered to recalculate the relative date ranges. These expressions are evaluated from the left to right pattern. The now term can also be used as a pointer to the currently evaluated value of the relative time expression.

For example, if you enter now-5M-2D+3Y as the Default Relative To Date and now as the Default Relative From Date:

 

In the Web client, the To date will be now-5M-2D+3Y by default.

In the expression, you can also use startOf and endOf functions. Both functions take the same arguments, a relative time string, and a unit.

Lastly, you can define a complex expression with the functions. For example, if you enter startOf(now-7D, W) as the Default Relative From Date and endOf(now, D) as the Default Relative To Date:

In the Web client, the From date will display the start of the previous week and the To date will display the end of the current day:

NOTES:

    • The Default Relative Dates will be used if the dashboard parameter is null/empty.

    • The relative Date/Time string is case sensitive.

    • The Default to Today and Default Relative Dates options are not available in the Use Action mode.

    • In the Web client, you can select from a pre-populated data ranges:

    1. Refer to Defining and Selecting Relative Dates in an Action Date Picker Control for more information.

  1. To modify the style settings of the Action Date Range Picker, make the necessary changes in the following controls:

    • Font - Click Change to display the Font dialog where you can set the Font Type, Style, Size, and Script.

    • Foreground - Click Change to display the Color dialog and set the Foreground color.

    • Background - Click Change to display the Color dialog and set the Background color.

    You may opt to click Restore Defaults to revert to the default style settings.

  1. Check the Display in PDF box to include this dashboard part in the PDF output.

  2. Click Close.

The resulting action control is displayed on the dashboard canvas.

When the Action Date Range Picker is executed, the selected From Date and To Date are passed as the parameter value into the action.