CellSpace/Manual (draft)
by CellWorks
Home
  
Table of Contents
  
Glossary
Records
Records
are one row from a . They are referenced in , and .
  • Records
    have a number of named fields. Each field can contain a constant, from a , or a value, calculated with a based on the values in the other fields.
  • A
    Record
    is used in a formula by declaring a local variable with a
    Record
    type.
  • For example:
  • 	MyRecord transaction = MySingleRecordQuery()
    	return transaction.amount
  • and
    Records
    can be used in For loops. For example:
  • 	var total = 0
    	for (MyRecord transaction: MyTransactionsQuery()) {
    		if (transaction.isDeposit) {
    			total = total + transaction.amount
    		}
    	}
    	return total
  • In this example the 'isDeposit' field is defined with a and is calculated with the 'amount' field rather than coming from the database query.
  • 	return amount > 0
  • Calculated
    Fields
    make it easy extend the database with additional logic and functionality without complicated SQL coding.
  • See the
    New
    ->
    Add
    Record
    to '
    Folder
    '
    menu item.