Magma JS Methods
Global Methods
Methods |
Description |
---|---|
Return the variable value within the current value set. |
|
Return the variable value within the current view value set. |
|
Return the joined variable value referenced by a variable value within the current value set. |
|
Return a map of variable values in the same group of occurrence within the current value set. |
|
Return the entity identifier within the current value set. |
|
Returns the variable object at the given name. |
|
Provides ‘info’ level logging of messages and variable values. |
|
Returns the current date time wrapped in a value object. |
|
Creates a new value. |
|
Creates a new value sequence. |
|
Return the value set creation time. |
|
Return the value set last update time. |
|
Load a javascript file. |
Variable Methods
Methods |
Description |
---|---|
Get the variable attribute value with the given name. |
|
Get the name of the variable as a Text value. |
|
Returns the value type of the variable, as a Text value. |
|
Returns the entity type of the variable, as a Text value. |
|
Returns the referenced entity type of the variable, as a Text value. |
|
Returns if the variable is repeatable, as a Boolean value. |
|
Returns the occurrence group of the variable, as a Text value. |
|
Returns the mime type of the variable, as a Text value. |
|
Returns the unit of the variable, as a Text value. |
|
Returns the nature of the variable ( |
|
Returns whether the variable value type is |
|
Returns whether the variable value type is |
|
Returns whether the variable value type is |
Value Methods
Methods |
Description |
---|---|
Returns true when the value contains all specified parameters, false otherwise. |
|
Returns true value when the value is equal to any of the parameter, false otherwise. |
|
Returns true if the value is null. |
|
Returns its argument if the value is null. This method may allow avoiding an if/else block. |
|
Uses a lookup table to map the a value to another (which may be computed or derived). |
|
Returns the contrary of a boolean value or return if it does not match any of the arguments. |
|
Returns or changes the value’s type. |
|
Returns the javascript value from the value object. |
|
Returns the length of the value. |
Value Sequence Methods
Methods |
Description |
---|---|
Returns true value if of the provided values can be found in the value sequence. |
|
Returns true value if is operating on a sequence that contains zero values. |
|
Returns the first value in a value sequence. |
|
Returns the first not null value in a value sequence. |
|
Returns the first position of a value in a value sequence. |
|
Returns the last value in a value sequence. |
|
Returns the last position of a value in a value sequence. |
|
Returns the value at a specified index within the sequence (0-based). |
|
Returns the number of values within a sequence. |
|
Map each value in the sequence to another value. |
|
Returns the reduction of the values within a sequence. |
|
Returns a sequence of distinct values. |
|
Returns a sequence which values have been filtered using custom javascript predicating function. |
|
Returns a subset of a sequence according to provided begin and end positions. |
|
Returns a sequence without null values. |
|
Sorts a sequence in natural order of its values or using a custom javascript comparing function. |
|
Returns the maximum value of a value sequence. |
|
Returns the minimum value of a value sequence. |
|
Returns the average of a value sequence. |
|
Returns the median value from a value sequence. |
|
Returns the sum of a value sequence. |
|
Returns the standard deviation of a value sequence. |
|
Adds one or more values after a value to produce a value sequence (deprecated in favor of append). |
|
Adds one or more values after a value to produce a value sequence. |
|
Adds one or more values before a value to produce a value sequence. |
|
Inserts one or more values at a given position to produce a value sequence. |
|
Joins the text representation of the values in the sequence. |
|
Returns a sequence of values, where each value is the transformation of a tuple of values, the i-th tuple contains the i-th element from each of the argument sequences. |
|
Turns a value object into a value sequence object. |
|
Returns whether the value is a value sequence object. |
Boolean Value Methods
Methods |
Description |
---|---|
Applies the ternary AND logic on values. |
|
Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. |
|
Returns if left operand value is equal to right operand value. |
|
Returns the contrary of a boolean value or return if it does not match any of the arguments. |
|
Applies the ternary OR logic on values. |
Numeric Value Methods
Methods |
Description |
---|---|
Returns a negative integer, zero, or a positive integer as the value is less than, equal to, or greater than the value argument. |
|
Returns if left operand value is equal to right operand value. |
|
Returns if left operand value is greater equal than right operand value. |
|
Returns if left operand value is greater than right operand value. |
|
Returns if left operand value is lower equal than right operand value. |
|
Returns if left operand value is lower than right operand value. |
|
Returns result of first operand value plus second operand value. |
|
Returns result of first operand value minus second operand value. |
|
Returns result of first operand value multiply second operand value. |
|
Returns result of first operand value divided by second operand value. |
|
Returns the natural logarithm (base e) of the value. |
|
Returns the base-10 logarithm of the value. |
|
Returns the absolute value. |
|
Returns the value raised to the power of the operand. |
|
Returns square root of the value. |
|
Returns cubic root of the value. |
|
Returns arbitrary root of the value. |
|
Returns the rounded value. |
|
Group values in a ranges. |
Text Value Methods
Methods |
Description |
---|---|
Returns a negative integer, zero, or a positive integer as the text value is less than, equal to, or greater than the text value argument. |
|
Returns a negative integer, zero, or a positive integer as the text value is less than, equal to, or greater than the text value argument ignoring case. |
|
Returns a value of date type given a date format pattern. |
|
Returns a value of datetime type given a date time format pattern. |
|
Returns if left operand value is equal to right operand value. |
|
Used to match a regular expression against a string. |
|
Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring. |
|
Returns the text type result of first operand concat second operand. |
|
Returns a copy of the string, with leading and trailing whitespace omitted. |
|
Returns a copy of the string, lower case. |
|
Returns a copy of the string, upper case. |
|
Returns a copy of the string, with first character of each word capitalized. |
Date and Datetime Value Methods
Methods |
Description |
---|---|
Adds days to a value of date time type. |
|
Returns true if the date value is after the specified date value(s). |
|
Returns true if the date value is before the specified date value(s). |
|
Returns the day of month from a date as an integer starting from 1. |
|
Returns the day of week from a date as an integer starting from 1 (Sunday). |
|
Returns the day of year from a date as an integer starting from 1. |
|
Returns the text representation of the date formatted by the provided pattern. |
|
Returns the hour of the day for the 12-hour clock (0 - 11). |
|
Returns the hour of the day for the 24-hour clock. |
|
Returns the minute within the hour. |
|
Returns the millisecond within the second. |
|
Returns the month of a date as an integer starting from 0 (January). |
|
Returns the quarter of a date as an integer starting from 0 (Q1). |
|
Returns the second within the minute. |
|
Returns the semester of a date as an integer starting from 0 (S1). |
|
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT (epoch time). |
|
Returns a boolean value indicating whether the date denotes a weekday (between Monday and Friday inclusively). |
|
Returns a boolean value indicating whether the date denotes a weekend (either Sunday or Saturday). |
|
Returns the week of month from a date as an integer starting from 1. |
|
Returns the week of year from a date as an integer starting from 1. |
|
Returns the year value. |
Geo Value Methods
Methods |
Description |
---|---|
Get the longitude of a point value. |
|
Get the latitude of a point value. |
Measurement Unit Methods
Methods |
Description |
---|---|
Sets the measurement unit of the current value to the specified unit. Returns the current unit when no argument is supplied. |
|
Measurement unit conversion: converts the current value into a different measurement unit. |