Ds
The ds function is used in a databox to recall the original value of that databox that was entered or populated. This is useful when you want to use the value of a databox multiple times in one expression.
These examples are available in the model scripts database provided when Keyfax is purchased.
Contents
Example One
The most simple example of this would be using it to square a number, multiply it by itself.
The script for this would look something like this.
The user is asked for a number to square, the expression Examples.ds.Square.value then makes the calculation and writes the result into the databox Script.Details which is then displayed in the message Example Message.DSSQR.
Setup
Script databox Examples.ds has an expression setup within as shown below.
Number * Number(ds)
This tells it to treat the value entered by the user as a number, then multiply it by the original value entered by the user.
For example, if you enter the number 9
Number 9 * Number(9) = 81
The result is written into Script.Details and output the message.