Altair® Panopticon

 

Adding an Action Date Picker

The Action Date Picker allows the entry of a Date/Time parameter.

Whenever the date picker value is changed, the associated action is executed.

Steps:

1.     After double-clicking or drawing a rectangle on the dashboard canvas, click  on the Select Part pane then click the Action Date Picker  icon.

The Action Date Picker pane is displayed, and the Action Date Picker part is added on the dashboard canvas with the current date and the Set button to the right.

 

2.     Select the Target Parameter that will be updated by the action date picker.

2.     3.Enter the Title of the action date picker button.

3.     Select the Date/Time Format.

Clicking on the Date/Time box displays the current month.

The text of the date can be directly entered, or alternatively it can be clicked on, to bring up a date picker in the Web client.

4.     Tap the Hide Button slider to turn it on. This means the action control will update the parameter whenever the value of the date picker changes.

5.     You can either:

·         tap the Default to Today slider to turn it on. This allows the action date picker to check the current value of the dashboard parameter. If it is set to null/empty, an action is executed to update the parameter and trigger the loading of the parameterized data with the current date.

·         enter the Default Relative Date. This allows the relative date calculation (based on today’s date), by parsing the input text string.

This method uses the following pattern:

SIGN NUMBER UNIT

Where:

¨        SIGN is either a ‘+’ or ‘-’

¨        NUMBER is any number

¨        UNIT which can be any of the following:

m – minute

H – hour

o    D – day

o    B – business day

o    M – month

o    Y – year

For example:

Pattern

Description

-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:

The date will be now-7D by default.

For example, now is January 15, it will go back 7 days (January 8) and then the date will be recalculated along with the Date/Time format.

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

For example, if you enter -1M:

The recalculated relative date will be January 13:

Complex expressions can also be entered to recalculate the relative date. 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 in the Action Date Picker Settings pane:

The 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.

For example, if you enter startOf(now, D):

 

The date will display the start of the current day:

Lastly, you can define a complex expression with the functions. For example, if you enter startOf(now-7D, W):

The date will display the start of the previous week:


 

NOTE

·         The Default Relative Date will be used if the dashboard parameter is null/empty.

·         The relative Date/Time string is case sensitive.

·         You can also opt to select from a pre-populated date ranges:

Refer to Selecting Relative Dates in Action Date Picker and Action Date Range Picker Controls for more information.

 

 

6.     Tap the Display in PDF slider to turn it on and include the action date picker in the PDF output.

7.     To modify the style settings of the action date picker:

·         click the Background box to display the Color dialog and set the background color or enter the Hex color code

·         click the Foreground box to display the Color dialog and set the foreground color or enter the Hex color code

·         set the Font type, size, style (Bold and/or Italic)

8.     Click the Save  icon on the toolbar to save the changes.

When saved, the  notification is displayed.