Server-side Action Scripting
Server-side action scripting makes it easy to add functionality to server-side events. For example, these actions can save data that was submitted from the client to the server, or populate client-side controls with data from a server, whenever the specified server-side event fires.
To add a server-side action to a server-side event first click the 'Action Scripting' button in the Server-side events page toolbar.
Select the desired action to add it to the Xbasic server-side event.
Available Action Scripts
- Save Submitted Data to Table(s)
Save the submitted data to one or more tables.
- Send an e-mail message
Send an e-mail message. The message can use fields from the component.
- Populate a Dialog with data from one or more tables
Populate the controls with data from one or more tables.
- Load Web Security Values
Populate the controls with data from the web security system.
- Validate Web Security Values
Validate data that will be saved in the web security system.
- Save Web Security Values
Save submitted data to the web security system.
- Change Web Security Password
Change a user's password in the web security system.
- Load Primary keys for Parent Table
Get a list of all of the primary keys in a query and store in the Dialog object.
Post-processing After an Action Script has Run
In some situations, you may want to execute additional Xbasic based on the result of an Action Script (e.g. generate a custom error message if a record was not saved.) Some Action Scripts have variables that you can reference in your Xbasic after the script has run. To find out what variables are available, place the mouse cursor in the text for an Action Script and select Show variables exposed by this action option from the Action Scripting button.
Alpha Anywhere will open a window that lists the variables available to your Xbasic script. These variables can only be referenced after the ExecuteServerSideAction function call for the Action Script.