| Applying science to business management |
  
Using Default Values
Asknumber and asktext both allow you to supply
default values that are automatically placed in the dialog's edit
box. If you can reasonably predict what response a user will
enter and you supply this default, your model will be much more
easy to use. For example, knowing that mortgage terms are usually
30 years, you can change the definition of Term from
Term:=asknumber("Loan term in
years?")
to
Term:=asknumber("Loan term in
years?",30)
With this change, the Term dialog box will have the
value 30 already entered when the dialog box is first displayed.
All the user has to do is click Next to accept the value.
In most cases it is difficult to predict what response a user
will enter. However, if the model is designed to be run several
times, the last value the user entered in a dialog box is the
most likely response that will be entered the next time around.
You can use the last response as the default value by entering
node definitions of the form:
Price:=asknumber("House purchase
price?",Price)
Down Payment:=asknumber("Down payment?",Down Payment)
Interest:=asknumber("Annual interest rate?",Interest)
Term:=asknumber("Loan term in years?",Term)
To use a specific default value the first time a model is
calculated and then use the value for the previous evaluation on
all subsequent recalculations, use a definition of the form:
Term:=asknumber("Loan term in
years?",
IF(Term!=null,Term,30))
|