Scripting: Difference between revisions

From Memento Database Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:


== Native Memento Calculation scripting ==
== Native Memento Calculation scripting ==
Scripting for the Calculation field type is limited and is described well in '''[[Calculation field]]'''.
Scripting for the Calculation field type is described in '''[[Calculation field]]'''.


Scripting in Memento going forward will likely to be focused in JavaScript, as in '''[[JavaScript field]]''' and '''[[Triggers]]''', so getting used to JavaScript is recommended.
Scripting in JavaScriptis available in '''[[JavaScript field]]''' and '''[[Triggers]]'''.
 
'''<big>However</big>''', one feature of native Memento scripting that does not exist (as yet) in JavaScript is the ability to refer to fields of related libraries, so if for nothing else, it is still needed for that.


== Scripting Memento in JavaScript ==
== Scripting Memento in JavaScript ==

Revision as of 09:33, 12 December 2016

« Page as of 2016-11-04, editions Mobile 4.0.0, Desktop 1.0.6 »

This page is a stub, with some tidbits. A more complete page is forthcoming.

Native Memento Calculation scripting

Scripting for the Calculation field type is described in Calculation field.

Scripting in JavaScriptis available in JavaScript field and Triggers.

Scripting Memento in JavaScript

TBD

The JavaScript field type

TBD

JavaScript scripting for Memento Triggers

TBD

moment.min.js — a possibly useful wrapper for JavaScript dates & times

See http://momentjs.com and its subordinate pages Guides and Docs.

Tidbit
To get the current date, use moment().toDate(). To get the current date & time, use moment().toDate().getTime().

TBD