save( name, data )

Saves the given data into the Events table in the database and automatically associates it with the current session, trial and phase (if applicable).  Each entry in the Events table created using this function will have its EventSource set to “SavedData”, and will be exported into the Excel file for that session.

Arguments

name

saved into the “EventName” column of the Events table.

data

saved into the “NewValue” column of the Events table

Returns

The data that was saved into the database.

Example

Saves an important piece of data into the database.