Entering default values using ad hoc formulas
Within a formula, operations are performed according to the rules of algebraic logic. Use parentheses to set off separate operations within a formula. For an example, see Algebraic logic example.
Before you begin
If you have not already opened the Model window and selected the model you want to work with:
-
On the Database menu, click Models.
The Model window opens.
- Click and then select the model you want to work with.
- Click [OK].
When you click on a line in an existing model, Estimating refreshes the current variables from the items and assemblies in the database. If it encounters any changes made to the database since you last loaded the model, it asks you if you would like to run Check Model.
To enter a default value using an ad hoc formula:
- Place your cursor in the field where you want to enter a default.
- Enter = in the field and type the formula you want to use to calculate the default. Right-click to view the commands available for functions, operators, questions and other question formulas into your formula.
-
(optional) To save the formula, right-click and choose Save as Q Formula.
When the Question Formula window opens, you can name the formula and then save it for later use in the model.
- When you are finished, press Enter.
Tips:
- Press Esc to remove = from the field without entering a default.
- Click to view your ad hoc formula in the Calculation window.
- If you create an invalid formula, a red triangle appears. Move your cursor over it to view the details of the invalid formula.
- If you use incorrect syntax when entering your formula, Estimating displays your formula text in red. Place your cursor over any red text to view the error in your syntax.