I'm searching for help about writing functions based on field labels.
The only help I found is the one given when editing a spreadsheet sheetnode in a view :

${field_label} to indicate that this cell and subsequent ones should be filled with values of this field.
${FUNCTION(@field_label@, $field_label$, @cell_reference@, ...)} to indicate that this cell and subsequent ones should be filled with a calculation. @field_label@ are replaced with the corresponding cell references, and $field_label$ are replaced with actual field values.
$[FUNCTION(@field_label@, @cell_reference@, ...)] to indicate that a calculation should be placed in this cell. @field_label@ are replaced with the corresponding cell ranges.

I would be really pleased to have some examples.
Thanks in advance

Comments

qpro’s picture

Suscribing , same issue for me http://drupal.org/node/1223258.

infojunkie’s picture

Version: 6.x-1.5 » 6.x-1.x-dev
Status: Active » Fixed

Here's an example to use functions:

Let's say you have a view with fields Node: Title and Node: Nid. You can create a template that contains the following row:

A1 = ${title} to display all titles
B1 = ${nid} to display all nids
C1 = ${LOG10(@nid@)} to display LOG10 of nid for each row

You can also add a function $[SUM(@nid@)] in A2 that will contain the function SUM(B1:Bn) over all (n) exported rows.

A current limitation of the ${FUNCTION} replacement is that the field itself (in this example, ${nid}) must be present on the spreadsheet. That's because @nid@ is replaced with the cell reference for ${nid}, not its value.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.