« NOTE: THIS PAGE IS UNDER DEVELOPMENT. »
- arrays & sets
- the ability to design & create custom object types with any methods (functions) you like
- variable types (like very large integers, symbols)
- and statements (like conditionals (if...else), custom function construction (function) or iteration (do...while), etc).
- A trigger script, with event & phase options to perform custom calculations at certain crucial times, like before or after saving an entry or when a library or a field is opened
- An action script, applying to the current entry or library to perform actions including actions on fields across all libraries in a user's database inundated by the touch or click of a button.
- Shared scripts for use by trigger & action scripts to hold standard & often repeated code. The scripts are available to any other script, so you can change it in one place and have the effect in ask other scripts.
- A custom data source script to guide source data from sources around the web or within the user's sphere of influence to the appropriate destination fields within the user's database.
Sample simple expression scripts
- the value a hundred and twenty-three
- the characters M e m e n t o as a string
- 2 * currentWeight
- If currentWeight is 23 lbs, then 46 lbs
- (hours * 60) + 10
- If hours is 5 and minutes is 10, then 310
Sample complex expression script
Before release 4.10.0 on the mobile edition & 1.10.0 on the desktop edition, we had to validate entered data with a script like this one:
// Validate entered value: var StdLimit = 100 // Our std for all products value = field("Value") // Fetch value of field if (value <= StdLimit) // If within limit, value // Result is the value else // Otherwise, StdLimit // Result is the std limit
- a value that has a string (text) value or a numeric (number) value.
- String literal
- "This is a string of textual characters"
- String constant
- Sol or PlanetMars
- Number literal
- 123 or 314e-2 or -28.5
- Numeric constant
- Age or ListPrice
- Symbol constant
- a name representing a constant value, like pi or surname
- a name representing a value that may change over time, like sum, currentValue, or orderDate
- one or more characters that represent an expression, like + for plus or - for minus or * for multiplied by or / for divided by.
- Some operators are made up of other operators used in combination, like <= for less than or equal to or && for and also.
- in x++, ++ is a unary operator.
- in b - 5, - is a binary operator.
- in canDrive = age > 16 ? 'yes' : 'no', ? and : are used like if and else together as a ternary operator — the conditional operator. The > is a binary operator that returns true or false. If the result is true (the age is over 16), then canDrive will be true. If it is false, canDrive will be false. It is good for cases where something is this or else that — one or the other, plain & simple. Since it is plain & simple, it is (perhaps) appropriate to simplify the conditional as well, with ? and :.
Custom data source script