Skip to main content

Data Box

Returns the value of a selected data box.

Data Box block

Description

The Data Box block returns the value of a selected data box. This is a code block from the Interface drawer.

Usage

Data Box refers to the value of a selected data box.

Note: You should use data boxes for numerical values and labels for textual values. One advantage of using a data box is that you can title it.

Syntax

Input:

  • A data box from the dropdown menu
Data Box block syntax

Example

This is a model of an epidemic. To monitor the spread of the epidemic, data boxes and a line graph have been employed to monitor immune, uninfected, and infected populations. An epidemic occurs when the infected population exceeds the expected infected population. Thus, when over 5% of the population is infected, the warning label is shown.

Data Box example code