SetControlValue & ResetControlValue

icon picker
SetControlValue & ResetControlValue

Formula: SetControlValue() , ResetControlValue()
Category: Action
re-enter-pincode (1).svg
Sets a value of a control to a user-defined value
or stated otherwise...
Hey Coda, will you please set the control to this value?
synchronize (1).svg
Resets the value of a control
or said differently...
Hey Coda, I want you to reset this control to its baseline.

SetControlValue() has two parameters:
controller (1).svg

SetControlValue(Control, Value)

The name of the control you want to set.

exposure-value (13).svg

SetControlValue(Control, Value)

The value to which you want to set the control.

ResetControlValue() has one parameter:
controller (1).svg


The name of the control you want to reset.

As with all Action formulas, the SetControlValue() formula is used in the context of a button. When a button that contains this formula is pressed, SetControlValue() will set a control to a value you define within the formula.
ResetControlValue(), on the other hand, resets a control to a value defined not in the formula itself but rather in the “starting value” section of the control itself.

Explore the activity below and watch how the SetControlValue() and ResetControlValue() formulas work!

Let’s say you have a task list with tasks organized by high, medium, and low priorities. You want to provide your users a more app-like experience in filtering the task list and hope to do so by filtering the table with buttons.
Control That Contains The Priority Value:
Button To Set The Priority Control:
High Priority
Medium Priority
Low Priority
Button To Reset The Priority Control:


My Task List
Due Date
No results from filter

A Note About ResetControlValue()

ResetControlValue() only takes one parameter, that being the control you want to reset. But what does value does it reset a control to? You can actually define the value of a control as its starting-value, but it’s not done in the button formula, rather its configured on the control itself.
Believe it or not, the two buttons below have the exact same formula, yet the do completely different things. Don’t believe me? Click into their configurations to see for yourself!
Difficulty Control:
Set Easy
Reset to Blank
Difficulty Control:
Set Easy
Reset to All Values

Create an app-like experience for your users by filtering a table with buttons
Reset a control value to a value defined in the control itself

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.