Gallery
SetControlValue & ResetControlValue
Share
Explore

icon picker
SetControlValue & ResetControlValue

Formula: SetControlValue() , ResetControlValue()
Category: Action
re-enter-pincode (1).svg
SetControlValue()
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
ResetControlValue()
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
Control

SetControlValue(Control, Value)

The name of the control you want to set.


exposure-value (13).svg
Value

SetControlValue(Control, Value)

The value to which you want to set the control.

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

ResetControlValue(Control)

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.
cruise-control-on
Control That Contains The Priority Value:
None
Button To Set The Priority Control:
High Priority
Medium Priority
Low Priority
Button To Reset The Priority Control:

Reset


My Task List
Task
Priority
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:
Blank
Set Easy
Reset to Blank
Difficulty Control:
EasyMediumHard
Set Easy
Reset to All Values


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












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