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 local set with a section variable

Section 1 of 210 min

A local set with a section variable

Build six buttons that share a section variable so only one stays lit, without talking to a device.

After this section you can:

  • Create a String Self variable on a section and read it as $(parent.state.selected) from a child button.
  • Use Set Section Variable on Press so each button writes its own value.
  • Light the matching button with an Expression feedback.
In this section you'll learn why Buttons has no radio control, and you'll build a six-button set whose selection stays inside one section.

There's no radio control#

One press should light one button in a group and turn the others off. Buttons doesn't have a separate radio type for that. You get the same behaviour with a shared variable: each button writes its own value on press, and an Expression feedback lights the button whose value matches.
Don't put device actions on these buttons until the lighting is correct.

A shared value on the section#

A Parent variable is the section's own Self variable, seen from a button inside it. There's only one value, so every button in the section sees the same selection.
Who reads it
Reference
The section itself
$(self.state.selected)
A button sitting directly in the section
$(parent.state.selected)
Parent reaches only one level down. A nested inner section doesn't see the outer selected as $(parent.state.selected). A second copy of the section on the same position has its own value. That's what local means.
The full scope picture is in Understand variable scope.

Press writes, Expression lights#

Piece
Job
One String variable on the section, named selected
Holds the current option, for example 1 through 6
Each button's Press action
Writes that button's value with Internal Set Section Variable, Section set to Parent
Each button's Internal Expression feedback
True when $(parent.state.selected) equals that button's value. Style the true state so it's obvious, for example a red background
Only one value can sit in the variable at a time, so only one Expression is true.
The local row is the left section. This course builds that row first. The right row is section 2. Your labels may differ.
Read more in the docs:Understand variable scope,Use variables,Create your first button,Add more feedback to a button,Internal actions reference

Try it

In your own Buttons installation.

Use a position that isn't on air. Practice Position from Foundations is fine.
  1. Open Position → Position, select the position, and open the editor. Select Apply only after the layout is the way you want it.
  2. Add a section. Set its label to Local radio (section variable).
  3. Inside it, add six buttons in one row. Set their Design labels to Option 1 through Option 6.

Add the section variable#

  1. Select the section, not a button. Open Variables.
  2. Next to Self, select +.
  3. Name: selected. Type: String. Select Create.
  4. Initial: 1. Select Apply.
From a button inside the section, the same variable appears under Parent. Either place creates it on the section. Child buttons read $(parent.state.selected).
selected lives on the section. Live and Initial are both 1.
Creating Self and Parent variables is covered in Use variables.

Press writes the option#

  1. Select Option 1. Open Actions.
  2. Under Press, select Add Action... and choose Internal Set Section Variable.
  3. Section: Parent (the default). Variable: selected. Value: 1.
Each button writes a different Value. This screenshot shows Option 2 writing 2.
  1. Repeat on the other five buttons. Change only Value (2 through 6). Duplicating Option 1 and editing the value is faster than starting each action from scratch.

Expression feedback lights the selected button#

  1. Select Option 1. Open Feedbacks.
  2. Select Add Feedback... and choose Internal Expression.
  3. Expression:
$(parent.state.selected) == '1'
The editor wraps this as an expression. Confirm the live result under the field (= true on Option 1 if the initial value is 1). Button feedback covers Expression in more detail.
  1. In that feedback's Button Styling, set a Background Color that is clearly different from the Design tab, for example red. Leave Context and Text empty so the Design labels stay.
The Expression is true only when the section variable matches this button.
  1. Repeat on the other buttons. Change only the compared string ('2' through '6').
  2. Hold Shift and click Option 3. Option 3 should go red and Option 1 should go back to the Design background. Click Option 6: only Option 6 stays lit.
A second copy of this section on the same position keeps its own selected value.

Tip

Shift-click in the editor runs the Press actions. That's Execute Mode. These buttons have no device actions, so it's safe here. Don't use it on a live panel that talks to equipment.

Quiz

Answer the questions for this section. You need 80% to move on.

  1. Question 1
    1.

    What makes a six-button group behave like a radio set in Buttons?

  2. Question 2
    2.

    A button sits directly in a section that has a Self variable named selected. How does the button read that value?

  3. Question 3
    3.

    Which Internal action writes the section variable from a button Press?

  4. Question 4
    4.

    The Expression on Option 3 is $(parent.state.selected) == '3'. Option 1 is still lit after you press Option 3. What's the most likely cause?

  5. Question 5
    5.

    Which of these are true of a section-scoped radio set? Select all that apply.

0 of 5 answered

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

In this section

  • There's no radio control
  • A shared value on the section
  • Press writes, Expression lights
  • Try it
  • Quiz