Difference between revisions of "Deprecated - Custom Field Type: Special - Spreadsheet"

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
 
==Notes==
 
==Notes==
===Values===
+
===Template===
The '''Values''' field allows you define a default template including formatting, formulae and initial values.
+
The '''Values''' field allows you define a template including formatting, formulae and initial default values.
 
* The default template can be created by creating a record that contains a '''Spreadsheet''' custom field. Create the spreadsheet as desired, including any formatting, formulas and initial values. Then from the Spreadsheet menu select '''View''' and then '''Source'''. The HTML shown can be copied and pasted into the '''Values''' field.
 
* The default template can be created by creating a record that contains a '''Spreadsheet''' custom field. Create the spreadsheet as desired, including any formatting, formulas and initial values. Then from the Spreadsheet menu select '''View''' and then '''Source'''. The HTML shown can be copied and pasted into the '''Values''' field.
  
Line 43: Line 43:
 
</pre>
 
</pre>
  
 +
===Variables===
 +
The data stored within cells on the spreadsheet can be referenced as [[Variables]] in [[Read Only - System Variables]] fields, [[Web Page View]]s etc:
  
 +
'''Syntax:'''
 +
*Single Cell:
 +
:<font size=3>@sps.''fieldname''.B2@</font>
 +
 +
*Range of Cells:
 +
:<font size=3>@sps.''fieldname''.A1:C1@</font>
 +
:<font size=3>@sps.''fieldname''.A1:C3@</font>
 +
 +
'''Where:''' ''fieldname'' is the name of the '''Spreadsheet''' custom field.
  
  
 
[[Category:Custom Fields]]
 
[[Category:Custom Fields]]

Revision as of 15:26, 20 May 2010

Notes

Template

The Values field allows you define a template including formatting, formulae and initial default values.

  • The default template can be created by creating a record that contains a Spreadsheet custom field. Create the spreadsheet as desired, including any formatting, formulas and initial values. Then from the Spreadsheet menu select View and then Source. The HTML shown can be copied and pasted into the Values field.

Sample:

<TABLE border="1px" id="jSheet" class="jSheet ui-widget-content ui-corner-all" style="width: 708px;">
 <TR height="30" style="height: 30px;">
      <TD height="30" id="cell_c1_r1" class="styleBold styleUpper">Requested Budget</TD>
      <TD id="cell_c2_r1"/>
      <TD id="cell_c3_r1"/>
      <TD id="cell_c4_r1"/>
      <TD id="cell_c5_r1"/></TR>
 <TR><TD id="cell_c1_r2">Cost Items</TD>
      <TD id="cell_c2_r2">Year 1</TD>
      <TD id="cell_c3_r2">Year 2</TD>
      <TD id="cell_c4_r2">Year 3</TD>
      <TD id="cell_c5_r2">Total</TD></TR>
 <TR style="height: 16px;"><TD style="font-weight: bold;" id="cell_c1_r3">Staff</TD>
      <TD id="cell_c2_r3"/>
      <TD id="cell_c3_r3"/>
      <TD id="cell_c4_r3"/>
      <TD id="cell_c5_r3" formula="=SUM(B3:D3)"/></TR>
 <TR style="height: 16px;">
      <TD style="font-weight: bold;" id="cell_c1_r4">Equipment</TD>
      <TD id="cell_c2_r4"/>
      <TD id="cell_c3_r4"/>
      <TD id="cell_c4_r4"/>
      <TD id="cell_c5_r4" formula="=SUM(B4:D4)"/></TR>
 <TR><TD id="cell_c1_r5">Materials</TD>
      <TD id="cell_c2_r5"/>
      <TD id="cell_c3_r5"/>
      <TD id="cell_c4_r5"/>
      <TD id="cell_c5_r5" formula="=SUM(B5:D5)"/></TR>
 <TR><TD style="font-weight: bold;" id="cell_c1_r6">Travel</TD>
      <TD id="cell_c2_r6"/>
      <TD id="cell_c3_r6"/>
      <TD id="cell_c4_r6"/>
      <TD id="cell_c5_r6"/>
      <TD id="cell_c6_r6" formula="=SUM(B6:D6)"/></TR>
</TABLE>

Variables

The data stored within cells on the spreadsheet can be referenced as Variables in Read Only - System Variables fields, Web Page Views etc:

Syntax:

  • Single Cell:
@sps.fieldname.B2@
  • Range of Cells:
@sps.fieldname.A1:C1@
@sps.fieldname.A1:C3@

Where: fieldname is the name of the Spreadsheet custom field.