Form Questions
This tabbed dialog can be accessed from the Form Properties button
or from the editor menu.
The dialog serves two purposes:
It allows you to enter form questions and prompt users for specific information when a form starts executing. For example, the form might ask for a date or transaction number range that the form should limit its range to. These "variables" or return values can then be used in the form as "rules" or special conditions for including or excluding report data.
To initialize special variables by executing CAPITAL Business Script . Advanced users can use this dialog to run blocks of program code and set-up the environment for further processing later on. CAPITAL Business Script code is executed here before form printing begins.
You may optionally enter script code here that is executed before the form is run.
You many optionally enter script code here that is executed after the user has responded to form questions.
Will assist you in creating a question. Consult Question Wizard for further information.
Form Question Dialog
Enter the question to prompt the user with. If this is left blank the user will not be prompted to respond to the question. (Any CAPITAL Business Script code applicable to the question will still be executed.)
Enter the optional prompt message to appear in the status bar at the bottom of the window when the user is prompted with this question.
Enter the name of a form variable that will hold the user response for this question. The first 10 characters of the variable name are significant. (Anything longer is accepted but ignored.) Variable names must consist of letters and numbers only. Punctuation and special symbols are not allowed. The variable name must also start with a letter of the alphabet. Case is not significant, so you may enter the variable name in upper or lower case or use a combination of both.
These are valid variable names: Answer1, Tdate, FirstNum, X1, Abc123.
These are NOT acceptable names: 123, 1AAA, %Tran.
You must declare the variable here. It can also be used as an advanced option to allow you to enter CAPITAL Business Script . This script code will be executed before the user is prompted for a question.
You must also declare a variable here that will be used by CAPITAL to determine the type of response expected from the user. For example, if you entered:
DECLARE TranNumber TYPE Transaction
and then entered TranNumber in the Result In field, CAPITAL would know that it should prompt for a transaction number.
You could also specify a default response. For example:
DECLARE StartDate TYPE Date
StartDate := Today()
This would store the current system date in the variable StartDate.
Conditional
Execution
If the last command returns a FALSE result, CAPITAL will not prompt for this question. This can be useful as it allows you to skip a question based on any pre-defined condition. (Such as the answer to the question being passed to the report from another application.)
Select the list type and then click on the browse to change the field list displayed. This is a reference list that allows you to view what fields are available in the current database.
Click on the test button to determine whether you have any errors in the CAPITAL Business Script code that you have entered in the Ask Question On Condition box.