Skip to main content
Skip table of contents

Expressions

LabMaestro allows you to create certain formulas or expressions, and you can use the result of these expressions in many ways.

Thank you for your interest in LabMaestro Public Beta! The page you are trying to access is under development. We are working on comprehensive documentation to help you make the most of our software. If you require any help, please feel free to contact us via email at support@vpixx.com.

The primary reason to use expressions is to assign the value of a variable to a component's property in a timeline. You can you also perform common mathematical operations with them, or call for Object References within another expression. You could also use Booleans, Logical Operators, and Relational Operators to customizeFlow Control Within Timelines.

You can insert expressions into most text boxes of properties, by prefixing them with an equal sign, similar to Excel. You can also add them to the Text of a Text Region using curly brackets: {Expression}.

Many variables can be used in the expressions system, from Constant Stimuli (Condition List) variables, Timelines variables, Object References, and special defined variables. For ease of access, the variables that are available to a given timeline will be shown in the variables panel when the timeline is selected.

Expressionsalways ignore the case (capitalization) of variables and properties they refer to. This means that if you define a variable as "MyVariable," you can also refer to it as "myvariable" or "MYVARIABLE" without any issues. However, to avoid confusion, it is recommended that you maintain a consistent capitalization scheme for your variables and properties. This will help make your projects more readable and understandable.

While the value boxes in the variables panel are not read-only, changes to those values will be overwritten when running the experiment.

When you make an expression, you provide some basic information and details to the system. Once you have finished editing the expression, LabMaestro will conduct a series of steps to ensure that the expression is valid. If so, it will process, or evaluate it, typically when you preview a timeline or Launch an experiment.

Variable names in the variables panel, properties in the property panel, and in other areas, may by displayed with spaces after capitalization to make them easier to read. However, when using these names in expressions, the spaces should be disregarded, and the words should be merged together. In general, it's important to avoid adding spaces in variable names for expressions, since LabMaestro will interpret them as separate variables.

LabMaestro will outline a field in red if it cannot interpret an expression, such as a customized property value. If you encounter such an error, hover your mouse over the expression to see an error code. You can visit Common Expression Errors for more explanations regarding common error codes.

LabMaestro provides several options for previewing experiment designs. However, it is important to note that the previews only have access to locally available information: Previews may not always be complete. For instance, you may have incorporated variable delays or method-driven values that may only come into full effect during runtime when clicking on ‘Launch Experiment'. Therefore, as part of the experiment design process, you should always examine the outputs of a deployed experiment file to ensure you have a comprehensive understanding of the experiment’s behaviour at runtime.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.