When you are editing records, there are two options for defining content of target cells:
Specify an image to be inserted into the cell.
Specify an explicit value, or a value based on a formula, that can be applied to a range of cells in the grid.
When selecting an image type, you can enter a path to the image relative to the application server hosting Mobile Web Studio. For example, for the icon_arrow.gif under the images directory in the onepage Web application directory, enter: /onepage/images/icon_arrow.gif. You can also specify a full HTTP URL reference.
When selecting a value type, you can use a syntax that allows you to specify ranges of existing cells, and perform functions (nested if required) on these cells. The syntax is:
<command>(args[, ...])
where <command>
is
the operation to perform, and args
are
the arguments to use.
Commands include:
sum – sums the arrays of cells specified.
avg – calculates the average of arrays of cells.
int – returns the integer portion of argument.
diff – determines the difference between two arguments.
div – divides two arguments.
concatenate – concatenates all the specified cells.
concatenate2 – concatenates all the specified cells, inserting pad characters.
min – determines minimum of specified arrays of cells.
max – determines maximum of specified arrays of cells.
These commands are described in detail in the sections
that follow.
Arguments include:
Scalar – specifies a single-element value (either some literal text, or cell content).
Array – specifies a range of cells, which can be one- or two-dimensional.
To specify single-cell content, use this syntax:
$R<x>F<y>
where <x>
and <y>
are
indexes into the cells. For example, $R4F5 specifies record
4, field 5.
You can use the special value 0 as an index to indicate the current value. For example, if you are editing record 6, field 9, $R0F9 refers to record 6, field 9. This is especially useful for rules that edit a number of records or fields at once; it enables you to use a single rule to perform the same operation on a range of cells.
Array arguments use the single-cell syntax, combined so that a range of cells is specified. That is:
$R<x>F<y>[:R<x'>F<y'>]
If the second cell specifier is not present, the array consists of a single cell; if the second cell is specified, the array consists of all the cells in the indicated range. For example, $R5F2:R6F3 indicates records R5F2, R6F2, R5F3, R6F3. Again, use 0 as an index to use the current record or field.
If a function is expecting an array argument, a scalar
is accepted and treated as a single cell array. However, if a function
is expecting a scalar argument, an array argument cannot be accepted.
This function sums all arguments, and returns a single result.
There can be one or more array arguments. Summation is carried across all the arrays specified (or, if scalars, by simply adding the scalar value to the current summation). Non-numeric values are ignored. The result is returned as a floating point value.
=sum($R3F4:R7F6)
=sum($R6F4, $R10F8)
=sum(5, $R6F7)
This function sums all arguments, divides the result by the number summed, and returns a single result.
There can be one or more array arguments. Summation is carried across all the arrays specified (or, if scalars, by simply adding the scalar value to the current summation). Non-numeric values are ignored, and not added to the count of items summed. The result is returned as a floating point value.
=avg($R3F4:R7F6)
=avg($R6F4, $R10F8)
=avg(5, $R6F7)
This function returns the integer portion of a single scalar argument.
There can be only one scalar argument.
=int(2.5)
=int(=sum($R6F4:R10F8))
This function subtracts the second argument from the first argument.
There can be only two scalar arguments.
=diff($R3F4, $R7F6)
=diff($R3F4, $R7F6)
=diff(5, 3)
This function divides the first argument by the second.
There can be only two scalar arguments.
=div($R3F4, $R7F6)
=div($R6F4, 5)
=div(10, 2)
This function concatenates all arguments, and returns a single result.
There can be one or more array arguments. Concatenation is carried across all the arrays specified (or, if scalars, by simply concatenating the scalar value to the current result).
=concatenate($R3F4:R7F6)
=concatenate($R6F4, $R10F8)
=concatenate(5, $R6F7)
This function concatenates the second and subsequent arguments, using the first argument as a pad, and returns a single result.
The first argument is scalar, and specifies the pad string to be used; there can be one or more subsequent array arguments. Concatenation is carried across all the arrays specified (or, if scalars, by simply concatenating the scalar value to the current result). The pad value is inserted between all concatenated values (but not appended or prefixed).
=concatenate2(abc, $R3F4:R7F6)
=concatenate(-, $R6F4, $R10F8
This function determines the minimum value across all the arguments, and returns a single result.
There can be one or more array arguments. Determination is carried across all the arrays specified (or scalar values, if used). Non-numeric values are ignored. The result is returned as a floating point value.
=min($R3F4:R7F6)
=min($R6F4, $R10F8)
=min(5, $R6F7)
This function determines the maximum value across all the arguments, and returns a single result.
There can be one or more array arguments. Determination is carried across all the arrays specified (or scalar values, if used). Non-numeric values are ignored. The result is returned as a floating point value.
=max($R3F4:R7F6)
=max($R6F4, $R10F8)
=max(5, $R6F7)
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |