Difference between revisions of "FieldJavaScripting"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
old>Admin
Line 32: Line 32:
* None (yet)
* None (yet)


=== Help for syntax ===
==== Help for syntax ====
The API cuurently supports the following language features
The API cuurently supports the following language features
* All standard functions from JavaScript
* All standard functions from JavaScript
Line 43: Line 43:
** JavaScript IO functions like '''alert''' and '''input'''
** JavaScript IO functions like '''alert''' and '''input'''
** JavaScript DOM objects like '''window''' and '''document'''
** JavaScript DOM objects like '''window''' and '''document'''
==== Example ====
  if( getValue('NUMBER2') > 1000 )
    setValue('NUMBER1',  Math.round( 100 * Math.random() ) );


== Developer info ==
== Developer info ==

Revision as of 22:24, 27 August 2013

Calc: Formula

Executing Javascripts client AND serverside

NOTE: This feature is currently BETA, and features are subject to change.

Properties

  • Type: Complex
  • Groupable: No
  • Show in lists: No
  • Searchable: No


User interface

Field in show mode

File:FieldJavaScripting show.png

Due to its nature this field has no special editing mode.

User interface as displayed in picture


Configuration

This field requires configuration before deployment.

File:FieldJavaScripting BE.png

Required:

  • Functional JavaScript

Options:

  • None (yet)

Help for syntax

The API cuurently supports the following language features

  • All standard functions from JavaScript
    • Librarys like Math
  • Support for basic TS functions
    • getValue( variable )
    • setValue( variable, valueToAssign )
  • Unspported features include
    • JQuery commands (clientside only)
    • JavaScript IO functions like alert and input
    • JavaScript DOM objects like window and document

Example

 if( getValue('NUMBER2') > 1000 )
   setValue('NUMBER1',  Math.round( 100 * Math.random() ) );

Developer info

  • FeltTypeID: 83
  • SQL datatype: n/a
  • Class name: FieldJavaScripting
  • Field is ignored in tables