Text and GlobalText properties of global variables in dashboards

Each widget in a dashboard has its own spreadsheet engine. If multiple widgets reference the same global objects, then those objects are cloned to the engine of each widget. Thus, if two widgets reference the same global variable, you can update the variable in one widget without affecting the value of the cloned variable. This is to facilitate parallel calculation of multiple widgets.

The Text property of a global variable returns the value of the variable only in the current widget. But, sometimes, the value of a global variable must be available to every widget in a dashboard. The GlobalText property of a global variable returns the value that was written most recently by any widget in a dashboard.

You can use this example to see the difference between the Text and GlobalText properties:

  1. Create a global variable called gv_test, with a value of Widget 1 value.
  2. Create two reports, named Report 1 and Report 2.
  3. In separate cells in Report 1, specify =globalvariables.gv_test.text and =globalvariables.gv_test.globaltext .
  4. In Report 2, define an action to set the value of gv_test to Widget 2 value.
  5. In separate cells, specify =globalvariables.gv_test.text and =globalvariables.gv_test.globaltext.
  6. Add both reports to a dashboard.
    The widgets display these values:
    Property Report 1 widget Report 2 widget
    Text Widget 1 value Widget 1 value
    GlobalText Widget 1 value Widget 1 value
  7. Execute the action in the Report 2 widget.
    In the Report 2 widget, the values returned by Text and GlobalText change to Widget 2 value.
  8. Refresh the dashboard.
    The widgets now display these values:
    Property Report 1 widget Report 2 widget
    Text Widget 1 value Widget 2 value
    GlobalText Widget 2 value Widget 2 value