Method | Description |
---|---|
AddNote() | Adds a note to the specified experiment ID. Parameters: String. The text of the Note description. ![]() Example: Note: If your protocol is designed to be run without a form, you must explicitly create your own protocolExperimentData object. See Example: Declaring protocolExperimentData object. var protocolExperimentData = { experimentID: "Experiment XYZ", applicationName: "Affinity Purification", iteration: 1, lastStartedStepName: "", stepCompleted: true } experimentTagsDB.AddNote("Off deck incubation"); |
AddTagToCurrentStep() | Adds an experiment tag to the Experiments database as does calling experimentTagsDB.AddTag(). Except that AddTag() always specifies an order value of 1, whereas AddTagToCurrentStep() specifies whatever order value is supplied as the third parameter. Returns a Boolean value. It returns true if successful, and false if not successful. ![]() Parameters: • String. The Field Name to be added to the database as a tag. This string must not be empty, otherwise, a script error will result. • String. The Field Value to be added with the tag. This field may be blank. • Integer. The order that the tag is to appear in its section of an experiment ID report. This value must be 1 or greater. If it is 0 or less, a script error results. Examples: Note: If your protocol is designed to be run without a form, you must explicitly create your own protocolExperimentData object. See Example: Declaring protocolExperimentData object. var iter = experimentTagsDB.CreateIteration (experimentID, "Affinity Purification"); experimentTagsDB.AddTagToCurrentStep("Volume uL", "100", 3) experimentTagsDB.AddTag(protocolExperimentData.experimentID, protocolExperimentData.applicationName, protocolExperimentData.iteration, "", "Custom Field 1", "JS inserted"); |
CreateIteration() | Returns a long integer corresponding to an iteration number. Typically, AddTag() and CreateIteration() would be called at the start of the protocol, for example, in the startup script or in a task in the Startup Protocol. AddTag() would be called once for each tag to be created in the Experiments database. CreateIteration() would only be called once per protocol. Parameters: • Text string. The experiment ID. • Text string. The application name. |
GetHighestIteration() | Returns a long integer corresponding to an iteration number. A return of zero means this application has not yet been run for this experiment ID. Parameters: • Text string. The experiment ID. • Text string. The application name. |
GenerateReport | Generates a report (.pdf) of the specified experiment ID. Parameters: • Text string. The experiment ID. • Text string. The file path to the pdf file to be created. This second parameter can be blank, or omitted entirely. In this case, when this method call executes, a Save As file dialog box opens and prompts the user to specify the file name and storage location for the report. Example: experimentTagsDB.GenerateReport (experimentID, "C:\VWorks Workspace\VWorks\ExperimentReports"); |
StartOrCompleteStep() | Indicates the start and completion of a task sequence (step) to be tagged in the protocol for inclusion in the Experiments database. Returns a Boolean value: true if successful, and false if not successful. Parameters: • String. The name of the step to mark as started or completed. • Boolean true/false. Marks the step as started (false) or completed (true). If set to false (starting a step): – If the specified step has already been marked as started in the database, a warning will be displayed in the log, no action will be taken, and the function will return false. – Otherwise, the step will be marked as started, protocolExperimentData.lastStartedStepName will be set to the step specified in the first parameter, protocolExperimentData.stepCompleted will be set to false, and the function will return true. If set to true (completing a step): – If the specified step has not yet been marked as started or has already been marked as completed in the database, a warning will be displayed in the log, no action will be taken, and the function will return false. – Otherwise, the step will be marked as started, protocolExperimentData.lastStartedStepName will be set to the step specified in the first parameter, protocolExperimentData.stepCompleted will be set to true, and the function will return true. ![]() This method makes the same checks, and has the same effect, as executing a Step Started/Completed task. In the protocol, you would add a JavaScript task ( ![]() Examples: Note: If your protocol is designed to be run without a form, you must explicitly create your own protocolExperimentData object. See Example: Declaring protocolExperimentData object. experimentTagsDB.StartOrCompleteStep("Load Samples", false); |
For information about... | See... |
---|---|
Establishing connection to the experiment tags database Experiment ID reports | |
Using a form to track experiment data | |
Adding the Step Started/Completed task to a protocol | |
Using JavaScript in the VWorks software | |
VWorks-defined functions | |
Using JavaScript utilities | |
JavaScript task | |
Startup and cleanup protocols |