Events

Events within Workshop modules enable application builders to trigger specific behavior whenever a user takes a given action. Events can be triggered from many widgets, including the Button Group, Object Table on row selection, and Tabs widgets. Learn more in our event-triggering and navigational widgets documentation. A full list of available events is documented below, but available event types may vary by widget.

Layers

Layers events trigger changes in the on-screen display state of overlays (drawers and modals) in a Workshop module.

Open/Close {overlay name}

For each overlay in the module, the following two events are available:

  • Open: Open the overlay specified in the event name.
  • Close: Close the overlay specified in the event name.

Layout

Layout events trigger changes in the on-screen display within a Workshop module, such as switching the selected page, expanding or collapsing a given section, and switching the active tab in a Tabs layout.

Switch to {page name}

For each page in the module, an event is available to switch to the chosen page when the event is triggered. If the module is using a string variable for the Variable-Based Page Selection option, the value of this variable will not be updated as a result of a Switch to Page event. If you wish to keep this variable value in sync with the selected page, you can use a Set Variable Value event instead.

Expand/Collapse/Toggle {section name}

For each collapsible section in the module, the following three events are available:

  • Expand: Expand the section specified in the event name.
  • Collapse: Collapse the section specified in the event name.
  • Toggle: Expand the section specified in the event name if it is currently collapsed, or collapse the specified section if it is currently expanded.

If the specified section has a Boolean variable backing the collapse state, the value of this variable will not be updated as a result of one of these events. If you wish to keep this variable value in sync with the collapse state of the section, you can use a Set Variable Value event instead.

Example

As an example, an application builder has configured the following module displaying hospital data. The module contains an object table and an initially-collapsed object view that the builder would like to expand when the Open Hospital Object View button is selected.

hospital_object_table

At the bottom of a button's configuration pane for the Button Group widget, the application builder can choose to trigger a Layout event whenever the button is selected by choosing the Event option from the On click dropdown menu, then using the Add event button that appears to choose the desired Layout event.

expand_hospital_view

Once the button and event is configured, the section containing the object view will expand whenever a user selects the Open Hospital Object View button in this module, as shown below:

hospital_application_workshop

Switch to {tab name}

For each Tab section in the module, a Switch to {tab name} event will be added for each tab in the section. Unlike the Switch to {page name}, and section collapse state events, events that change the selected tab will also update the value of the string variable configured for Variable-Based Tab Selection if a variable is configured.

Variables

Variable events provide application builders with ways to change variable values within a Workshop module.

Reset {variable name} value

Reset {variable name} Value events will set the value of the chosen variable to its default value, which is the value configured in the variable definition.

Set variable value

The Set variable value event will assign the current value of the chosen source variable to the value of the chosen target variable.

Configuration options

  • Source variable: This is the variable value that will be copied immediately when the Set variable value event is triggered, without waiting for potential recomputation of its input variables from other events that are started at the same time.
  • Target variable: This variable value will be overwritten with the Source variable's value

Stream LLM response into variable

The Stream LLM response into variable event enables displaying the response of an LLM in real time within a Workshop module.

Configuration options

  • Target variable: The string variable to stream the response into.
  • Prompt: The prompt to send to the LLM. This can be a string variable or a function that returns a string.
  • Model: The language model to use. Three OpenAI models are supported: GPT-3, GPT-4, and GPT-4 32K.
  • Temperature: The temperature to use with the model, a number between 0 and 1. Higher values, like 0.8, will make the output more random, while lower values, like 0.2, will make the output more focused and deterministic.
  • Variable update delay: How frequently the variable will update, in milliseconds.

The screenshot below, which can be found within the event configuration, shows an example configuration with the supplied parameters described above.

Stream LLM response into variable configuration

AIP Assist

The Send to AIP Assist event offers a way to send either static text or the value of a string variable to AIP Assist and automatically run the query. When this event is triggered, the AIP Assist sidebar will automatically open if it is not currently open.

Applications

The following events provide a way to open other Foundry resources in a new browser tab. If the Workshop module is in a Carbon workspace, using these events will open the target resource in a new Carbon tab.

  • Open Workshop module: This event will allow an application builder to select a Workshop module and map variables from the current module to module interface variables from the selected module.
  • Open Quiver analysis:
  • Open Object view:
  • Open Object Explorer:
  • Open Notepad document (read-only):
  • Open Vertex exploration:

Data staleness

The Refresh data in module event allows all data in the module to be reloaded when this event is triggered.

Module appearance

The Toggle between light and dark mode event allows the theme of the module to be changed by the user when this event is triggered.