KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: C1, C2... Are now back in 2003.1
PRODUCT: 4D | VERSION: 2003.1 | PLATFORM: Mac & Win
Published On: July 28, 2003

The variables C1, C2... Cn were specific to the Quick report editor in versions prior to 6.8,x and have now been implemented in the new quick report editor. In a quick report, you may use hidden columns that compute formulas and other column that use their results.

When you create a Column that contains a formula it is given a name such as C1,C2...Cn. These names are also variables that can be used in another column's formula. For example, you can insert two columns and define "Random" as their respective formulas. You will notice that both columns have C1 and C2 as titles. The contents of the variables C1 and C2 are assigned by their respective formulas (a random value). If you create a third column (which will be named C3) and assign it the formula '(C1+C2)/2'. C3 will contain the average of both previous columns.

Note: when using a column variable in a different column, make sure that the column that uses the variable is to the right of the column generating the variable. If it is not the case, the variable's value will not be assigned when the other column attempts to use it.