I've looked in the script guides and throughout the forums without luck on how to exactly get this script of mine to work.
I have two tables: the first with three fields...A, B, C.
My second table has various rows and columns that will automatically calculate into a "total" column based on what the user enters into A, B, or C.
MY PROBLEM: How do I script "or", "either", "if/else", or whatever wording that essentially allows my table to calculate the amount depending on what field the user types into. For example:
Total = Table1.Row1.A * Table2.Row2.Miles
or
Total = Table1.Row2.B * Table2.Row2.Miles
or
Total = Table1.Row3.C * Table2.Row2.Miles
You can then use those logical statements in the "if" statement (form the "Scripting Reference" under LCD "Help") for FormCalc:
Syntax:
if ( simple expression ) then
list of expressions
elseif ( simple expression ) then
list of expressions
else
list of expressions
endif
The result of the list of expressions associated with any valid conditions
stated in the if expression.
Note: You are not required to have any elseif(...) or else statements as part
of your if expression, but you must state the end of the expression with endif.
George Kaiser