Bitfocus AS
Bitfocus AS

Loading...

Footer

Bitfocus

Subscribe to our newsletter

The latest news, articles, and resources, sent to your inbox.

FacebookInstagramGitHubYouTubeLinkedIn

Products

  • Buttons
  • Companion

Integrations

  • Supported Devices
  • Developer Community
  • Connection Development

Support

  • Support Overview
  • Documentation
  • Video Tutorials
  • Community Forum

Sales

  • Resellers & Integrators
  • Buttons Pricing

Updates

  • Case Studies
  • Events & Trade Shows
  • Press Releases
  • Product Updates
  • Webinars

Legal

  • Legal Overview
  • Privacy Policy
  • Buttons EULA
  • Terms & Cookie Policy

Company

  • About us
  • Press kit
  • Careers
Co-funded by the European Union

Our Bitfocus Workflow 2.0 project is co-funded by the European Union’s Creative Europe programme. About the project

© 2026 Bitfocus AS. All rights reserved.

  1. Home
  2. Academy
  3. Radio-button sets
  4. A global set with a workflow variable

Section 2 of 210 min

A global set with a workflow variable

Share one radio selection across Buttons with a workflow variable and Set Workflow Variable.

After this section you can:

  • Create a String workflow variable and name the workflow Variable Key used in $(RadioSet.selected).
  • Write the variable from a button with Set Workflow Variable.
  • Explain why a workflow variable is global and a section variable is not.
In this section you'll put the same six-button pattern on a workflow variable, so any position can share one selection.

When local isn't enough#

A section variable stays in that section. Use a workflow variable when any position, section or workflow should share the same selection.
Creating the variable requires a workflow. Once it exists, Set Workflow Variable and $(RadioSet.selected) work from anywhere. There's one value for the whole system.

Two keys that are easy to mix up#

The workflow has two keys:
Key
Where you set it
What it's for
The workflow Variable Key
On the workflow, in Settings, for example RadioSet
The prefix in $(RadioSet.selected)
The variable's own Variable Key
On the Workflow Variable node, for example selected
Which value on that workflow
Set Workflow Variable is an Internal action on buttons and positions. It isn't offered inside the workflow editor. To change the value from a button, use that action. To light the button, use an Expression such as $(RadioSet.selected) == '1'.
A section variable can't do this. $(parent.state.selected) only reaches buttons sitting directly in that section.
Internal actions lists both Set Section Variable and Set Workflow Variable.
Read more in the docs:Understand variable scope,Use variables,Internal actions reference

Try it

In your own Buttons installation.

Use the same practice position as section 1.
  1. Add a second section. Set its label to Global radio (workflow variable). Put six buttons in it, Option 1 through Option 6. This section doesn't need its own selected variable.

Create the workflow variable#

  1. Open Workflow and create a workflow. Label: Radio Set Global.
  2. Set the workflow Variable Key to RadioSet.
  3. Drag a Workflow Variable node onto the canvas.
  4. Variable Key: selected. Type: String. Initial Value: 1. Leave Persist Value off unless you want the last press to survive a restart.
  5. Confirm the node, then Apply the workflow.
The node key is selected. The list on the left is the workflow Radio Set Global.
Creating workflow variables is covered in Use variables.

Press writes the workflow variable#

  1. On Option 1, open Actions. Under Press, select Add Action... and choose Internal Set Workflow Variable.
  2. Workflow: Radio Set Global. Variable: selected. Value: 1.
The action names the workflow and the variable. Value is this button's option. This screenshot shows Option 2.
  1. Repeat for 2 through 6.

Expression feedback using the workflow prefix#

  1. On Option 1, add Internal Expression:
$(RadioSet.selected) == '1'
  1. Style the true state the same way as the local set. Leave Context and Text empty.
  2. Repeat with '2' through '6'.
Use Browse Variables if you're unsure of the prefix. Workflows are grouped by Variable Key (RadioSet), then the variable selected.
  1. Shift-click Option 4 on the global row. Only that button lights.
  2. Shift-click Option 3 on the local row from section 1. The global row must not change. The two sets use different variables.
To prove the workflow set is global: add one extra button on another position with the same Set Workflow Variable and Expression pair. Pressing it changes the global row on this position as well.
Left row is the section variable. Right row is the workflow variable. They don't share a value. Your labels may differ.

Note

Set Workflow Variable only works while the workflow is running. If a press does nothing, check that you selected Apply and that the workflow is on.

Quiz

Answer the questions for this section. You need 80% to complete the course.

  1. Question 1
    1.

    You created a workflow whose Variable Key is RadioSet, and a String node whose Variable Key is selected. Which reference should the Expression use?

  2. Question 2
    2.

    Where do you change a workflow variable from a button?

  3. Question 3
    3.

    You press Option 3 on the local (section) row. The global (workflow) row stays on Option 1. Is that a fault?

  4. Question 4
    4.

    You want the same radio selection on two positions. Which scope do you use?

  5. Question 5
    5.

    Which of these are true of the workflow Variable Key RadioSet? Select all that apply.

0 of 5 answered

PreviousA local set with a section variableFinishRadio-button sets
Radio-button sets
  1. 1A local set with a section variable
  2. 2A global set with a workflow variable

In this section

  • When local isn't enough
  • Two keys that are easy to mix up
  • Try it
  • Quiz