Action_Parameters.html

There are several Reactor Controls that have optional Action parameters: for example, those in CalPack2 https://splashdocs.atlassian.net/wiki/spaces/FusionReactor/pages/2202665016 (DayCal2 https://splashdocs.atlassian.net/wiki/spaces/FusionReactor/pages/2202796052 , MonthCal2, ResourceCal2 https://splashdocs.atlassian.net/wiki/spaces/FusionReactor/pages/2202566662 , NavCal), GanttChartPro, Tagger and ImageFlowPro. Many of these controls also include Actions as overrides, not just paramters. See the Override Manager for details. e.g. Tagger has Action available through an override: ActionOnTagCreate, which gets triggered when the user adds a new tag.

The original Calendar Pack (DayCal, MonthCal, ResourceCal) has 2 actions only: actionOnApptSelect and actionOnDaySelect, and these are implemented in a non-standard way, and may not work exactly as described here.

Some Action overrides can take record data (SetField), while others are only set automatically, yet others (such as the DayCal2 Action, 'actionOnDaySelect') can take a date mask (DateMask) to format the data. To specify a date format for a supported Action, you can use the following in place of |GetField=.

"MyAction=Something|DateMask=Y-m-d"

Wherever you see the |GetField= syntax in the following documenation, you can substitute this with |DateMask= for Actions that support date masks. The type of data each Action parameter accepts is explained in the Override Manager entry for that Action.

To run a script:

"Script=<script name>", optionally followed by a vertical pipe and GetField=<fieldname on remote table>. All fieldname's need to be fully-qualified with their table occurrence names;

Please Note: In the original CalendarPack, no TO should be used. The older CalendarPack won't work WITH the table occurrence; standard Actions won't work WITHOUT it.

In the case of the DayCal2 ActionOnApptSelect, GetField should be used when you want to work with the appointment record currently selected. When you select an appointment, the selected record field value is passed into the script and can be retrieved using the usual Get( ScriptParameter ) calculation.

Examples of actionOnApptSelect:

"Script=Show DayCal Record" // or, with optional parameter; "Script=Show DayCal Record|GetField=Record ID" // Original CalendarPack. "Script=Show DayCal Record|GetField=Appointments::Record ID" // All others.

Examples of actionOnDaySelect:

"Script=ShowDay" "Script=ShowDay|DateMask=Y-m-d"

To set a field:

"SetField=<field on layout table>" optionally followed by a vertical pipe and GetField=<field name on remote table>.

SetField is used if you just need to populate a field, but don't need a script to perform any additional processing. GetField should be used when you want to set a field on the layout table to a value in the remote record. The same rules with |DateMask= applies here (as described above).

Examples:

Note that the SetField table must be the “home” table, while the GetField table must be the "related" table.

To set a global variable

"SetGlobal=<global variable name>" optionally followed by a vertical pipe and "GetField=<field name on related table>"

SetGlobal is used if you need to populate a global variable, but don't need a script to perform any additional processing. GetField should be used when you want to set a field on the layout table to a value in the remote record. The same rules with |DateMask= applies here (as described above).

Please Note: SetGlobal is NOT available in the Original CalendarPack.

Examples:

Notes on Action Behaviour

Behavior can differ between BlackBoxes. For example, the DayCal2 ActionOnApptSelect can allow you to 'do something' when a user selects an appointment on the Calendar. There is also an override (AllowDeselect=true) to have the same action triggered with an EMPTY value/parameter when the user DESELECTS the appointment.

Additionally, this particular action will only ever run if the value is different from the last time it was run. For example, if you click on a task with id '4', the script will run with '4' as the parameter. If the user clicks again on the task with id '4', nothing happens, because the parameter has not changed. If the user clicks on empty space (anywhere that there is no task), the script is run with a blank parameter. If the user clicks again on empty space, nothing happens, because the value has not changed (still blank).

Remember that overrides are specific for each BlackBox control, so for more details on a case-by-case basis, check with the Override Manager for your BlackBox control.