Event Details and Actions
The actions in an event chain are processed in order until one of them fails, or they all complete successfully. The list of actions displays common settings to all action types:
- Type - The type of event action that will be executed
- Condition - Optional expression to determine whether or not to execute the action. If the condition is empty, or evaluates to true the action will be processed.
- Ignore Error - Allows errors for the action to be ignored, so the application will continue processing the event.
Use the toolbar buttons to create, delete, and reorder the actions in the event chain. The following actions can be added to the various event bindings to compose the desired handling of the event:
Call Plug-in Function
This is the most commonly used event action, which allows DataSplice to call functions provided through additional plug-ins, including stored procedures, web services, and other business rules.
Function Provider/Group/Name - Allows you to select the specific function to call. The methods are typically organized by groups to make it easier to locate the desired function.- Disposition - Specifies where the function will be executed. The default (Local) causes the function to be executed on the same side of the connection that the event was initially fired. For instance, this allows an action to execute a function on the server even when called from a client-side event (if connected, of course).
- Parameter Bindings - Needs to be populated with a list of the parameters values that will be passed to the function with it is executed.
- Literal values will get bound directly to the parameter.
- Attributes enable custom attributes and record values to be bound to parameters.
- The code will perform necessary type conversions based on the parameter type. If the specified value cannot be converted the parameter will be bound as NULL.
Default Action
Performs the default action as described in the sections above. Delete this action to perform instead of event processing when needed.
This action can occur only once in any particular event chain.
Display Prompt
Displays a message to the user for warning conditions, errors, etc. This is another very commonly used action and will typically be used in conjunction with the Event Condition to control when the message is displayed.
The following settings control the behavior of the action:
- Prompt Message - The message displayed to the user.
- Accept Button - The label of the default button that causes the action to succeed and event processing to continue.
- Cancel Button - The label of the button that causes the action to fail and event processing to halt.
- Prompt Items - An optional list of items that will be presented to the user to acquire additional information if desired.
- Name - This label will be displayed in the prompt next to the entry
- Type - The data type of the prompt item
- Attribute - Name of an attribute that will collect the value of the prompt item, so it can be used later in the event chain. Note that the bare attribute name is used here (no curly braces).
- Style - Optional validation style used for the item to define how the text is formatted and provide lookup list information
- Default - The original value when the prompt is displayed
- Required - If checked, the user must supply a value to for the item
Several different cases can be covered using this action:
- Display a simple notification
- Provide only the Accept Button label so the message is always displayed and then normal event processing continues. This is especially useful for debugging view configuration.
- Display an error message
- Provide only a the Cancel Button message so the action always fails. This needs to be used in conjunction with an action condition that stats the error expression, otherwise the event will always fail.
- Display a warning
- Provide both labels so the user can either select the accept button to verify the current values and continue processing the event, or the cancel button to cancel the current processing and correct the underlying cause.
- Prompt for additional information
- Use the prompt items to obtain information from the user, and reference the attributes later in the event.
Execute Command Action
This can be used to perform arbitrary actions within the application.
- Command Type - Specifies how the the Command value is interpreted:
- RawCommand - Processes a raw expression. See the Attributes and Expressions section for syntax information, and the Expression Functions and Commands section for a list of available commands. Multiple commands can also be specified by separating them with semicolons (;).
- CustomEvent - The command should evaluate to the qualifier of the custom event to fire.
- ViewAction - The command should evaluate to the name of a navigation action within the current view which will be executed.
- Disposition - Explicitly controls where the command is executed. The default (Local)
is to perform the command wherever the event is being fired. However,
this can be used to execute functions on the server for client-side
events and vice-versa.
- Command - The command to process.
Modify Attributes
This action will apply changes to the attribute collection associated with
the current event. This can be used to modify record values if a single record is
associated with the event context by specifying the Field Name as the
attribute name.
- Modify Session Attributes - If this is selected, these attribute
settings will be applied to the user's session. These values will be
available for the lifetime of the session. The session attributes will be
available for both client-side and server-side processing.
- Attribute Collection - The specified attribute values will be applied on top of the event's attribute collection. These values will then be passed on to the next action in the chain.
Modify Filter
Allows the current query to be modified, which is typically used to restrict the data available to the current user by appending static filter conditions to any queries. This action will only have effect if called from ClientQuery or ServerQuery events.

- Replace User Filter - If checked, the filter is completely replaced with the specified value. Otherwise it is combined with the user's filter with a logical AND operator.
- Filter - The filter fragment that is either combined with, or replaces, the filter from the current query.
Create Record
Inserts a record with the specified values into the specified view.
- Target View - Specifies where the new record should be created. Note that this ignores the Insert Permission setting for the view - the record will be created regardless. This is useful in situations where the user should not be able to use the Create New Record button, but it is still desirable to create records through other actions.
- Record Values - Additional values that will be set for the new record. These will be processed after the record defaults, so they will override those values.
Modify Data
Applies a set of attribute modifications to all the records that match a particular query. Note that this action can only be called from client-side events, if it is referenced from a server event an error message will be displayed.

- Run Query Locally - Forces the query to be executed against local data, even if the session is currently connected to the server. This is needed in cases where you need to search for locally modified values that may not yet been committed.
- Status Label - If the query matches large numbers of records, this can take a long time to process. Specifying a label will cause a progress dialog to be displayed so the user is given feedback about the current processing. Otherwise a simple wait cursor is displayed.
- Target Query - Specifies the records to be modified. The sort settings typically only make sense if the Max Records option is set to exclude some matching records. For instance, sorting on a date field, and setting the max value to 1 might be used to update the most recent record that matches a particular query.
- Max Records - Specifies the maximum number of records that can match the query. If the results are larger than this value an error message is displayed.
- Attribute Collection - Provides the list of fields in the record that will be modified.
Note that the context is updated to include the each record that matches the query while processing this event, and the context of the current record from before the action is executed is lost. In cases where values from the selected record are being propagated to the matching records, you must use a Modify Attributes action to push the values into different attributes in the event context which can be accessed later.
Iterate Command
This is essentially a combination of the Modify Data and Execute Command actions. This runs the specified query and then executes a command for each matching record.
Again the context is updated to include the each record that matches the query while processing this event, so care must be taken if you need to access values from the selected record in the command. This also means that the target view is active for the command, so its events and actions available.

The available options are the same as those described for the Modify Data and Execute Command actions.
Delete Records
This is again similar to the Modify Data action, except each matching record is marked to be deleted. This removes inserted records from the data store, and marks existing records to be deleted on commit. Similar to the Create Record action, this also ignores the Delete Permission setting for the view.

The available options are the same as those described for the Modify Data action.