Skip to main content
Skip table of contents

Table Variables

Table variables are a special type of variable that represent a table. To define a table variable, go to the variables tab and change the type of a variable to table.

image-20250422-194009.png

Once you do so, the initial value input will change to allow you to import a table. Click on New and follow the instructions. Certain values, such as durations, cannot be stored in a table variable.

image-20250422-194055.png
image-20250422-194441.png
image-20250422-194503.png
image-20250422-194519.png

Once you have finished importing a table, you are ready to get started using them in your expressions. To use them, go to any expression box and use the following syntax: Variable[Row, Column]. If you then run a simulation, the expression will use the value in your data.

image-20250422-194811.png

Lastly, after you run a simulation, you can view the table that is stored in a variable by going to the model tab of the results and clicking on the icon under the variable name.

image-20250422-195517.png

Assignments

In addition to simply using table variables, you can also assign new values to them. To do so, create an assignment as normal, but select your table variable. When you do so, two new input fields will appear: Row and Column. These allow you to specify what row and column will be assigned to when this assignment occurs.

image-20250422-195607.png
image-20250422-200033.png

If you go back to the assignments page, you can get a preview of the assignment, using the same syntax as when you use a table variable.

image-20250422-195748.png

When you assign to a table variable, you must assign to an existing column, but not necessarily to an existing row. If you try to assign to a column that does not exist on your data, you will get an error that stops the current simulation. If you assign to a row that does not exist, a new row will be created.

JavaScript errors detected

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

If this problem persists, please contact our support.