Altair® Panopticon

 

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.

Adding Action Date Picker

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

  1. Click the Action Date 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 with a submit button to the right.

  1. Select the newly added control and click Settings .

The Action Date 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 Parameter drop-down list 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 Parameter drop-down list of the parameters defined in the selected action.

  1. Select the parameter that will be used to filter the data set.

  1. 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, or alternatively it can be clicked on, to bring up a date picker in the Web client.

  1. You can either:

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

    • or enter the Default Relative Date. This allows relative date calculation (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 date will be now-7D by default.

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

 

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 be October 28:

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

 

In the Web client, 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):

 

In the Web client, 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):

 

In the Web client, the date will display the start of the previous week:

NOTES:

    • The Default Relative Date 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 Date options are disabled in the Use Action mode.

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

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

  1. Check the Hide Button box for the action control to update the parameter whenever the value of the date picker changes.

  2. To modify the style settings of the Action Date 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 Picker is executed, the selected Date/Time is passed as the parameter value into the action.

The Date/Time parameter can then be displayed or specified in a data query using the appropriate Date/Time display format.

e.g., for the parameter CloseOfBusiness

To Display

Year & Month: {CloseOfBusiness:yyyy-MM}

3 Letter Month & Year: {CloseOfBusiness:MMM-yyyy}

Day Year and Month: {CloseOfBusiness:yyyy-MM-dd}

Day Year and Month: {CloseOfBusiness:yyyy-MM-dd}

Time: {CloseOfBusiness:HH:mm:ss}