Databases Reference
In-Depth Information
The
New Slider/Calendar Object
dialog window will appear and the
General
tab will be active. For a
Slider/Calendar
object, the
Input Style
option can be set
to either
Slider
or
Calendar
. The
Slider
object is the one we will be using in this
example, since the
Calendar
object is used to work with date values.
It's important to note that this object can be used not only
to interact with variables, but also to make field selections.
From the
Data
section, make sure to activate the
Variable(s)
radio button and select
the
vTop
variable from the drop-down list. The
Mode
and
Value Mode
settings will
be left with the default options.
We must set min and max values to delimit the slider's range of possible values. Set
the
Min Value
option to
5
and the
Max Value
option to
30
.
To specify that only integers should be used in the slider, enable the
Static Step
checkbox and set its value to
1
.
Click on
OK
and the slider will be created in horizontal form. It can be changed to
vertical, if desired, from the
Presentation
tab of the slider's properties.
The initial value the slider will hold is the one we previously set the
vTop
variable
to. To modify the value, click on the thumb tack and drag it to its desired value. The
chart will automatically reflect any change made to the variable and, at the same
time, the value stored in the
Input Box
object we previously created will be kept in
sync with the
Slider
object, since both objects are using the same variable.
Using variables based on expressions
In the previous section, we used a variable to store a static value. That is to say,
the value was not based on a calculation and therefore didn't respond to user
field selections.
We will now create a variable with a dynamic value, one that responds to the
document state and calculates an output value based on user selections. To keep
this example as simple as possible, we will create a value that will hold and return
the total number of FTEs based, on current selections, and use that value
in a chart expression.