subset_max("fieldname")
, for example.{ "result": value }
where value is the result of the expression; can be a complex object or array.{ "fieldCount" : 13, "recordCount": 1052, "fieldNames": ["field1","field2",...], "fieldTypes": ["text","text","date","integer","decimal",...] }
{ "result": [ [cell00, cell10, cell20], [cell01, cell11, cell21], [cell20, cell21, cell22] ] }
{}
to indicate success.dataArray(fields, rowSubset, includeFieldNames)
<p><b>Total:</b> {{ SUBSET_SUM("Coupon") }}</p>
<#
if (x==5) {
y = 3;
} else {
y = 2;
}
out.println("Write some text into the document, programmatically");
var array = subset_uniquesList("Category");
for (var i in array) {
#>
<b>Some text and HTML with <#=array[i]#> (inserted values)</b>
<#
}
#>
formula("IF(RAND<0.5, true, false)")
recordCount()
or recordCount(subset)
subset("Field name", "Field value")
or subset("Field name", "Field value", "Operator")
subset_sum("Field name")
or subset_sum("Field name", subset)
textvalue(value)
or textvalue(value, pattern)
input1.recordCount()
input[0].subset_sum("Price")
[
["1, 1", "1, 2", "1, 3"],
["2, 1", "2, 2", "2, 3"],
["3, 1", "3, 2", "3, 3"]
]
[
[
input1.recordCount()
],
[
input2.recordCount()
]
]
working = new Array();
for (i in inputs) {
var input = inputs[i].dataArray(null, null, true);
for (n in input) working.push(input[n]);
}
working;
DECLARE(
/* Store position of first alpha (A-Z) and first nuymeric (0-9) */
firstAZ, SEARCHREGEX("[A-Z]",[Postcode]),
first09, SEARCHREGEX("[0-9]",[Postcode]),
IF(
/* Check that we found both an alpha and a numeric, and that the numeric is after the alpha i.e. a valid postcode format */
AND(firstAZ > 0,first09 > firstAZ),
/* Extract the alpha characters, if valid */
MID([ Postcode], firstAZ, first09-firstAZ),
/* Return nothing if postcode invalid */
NULL
)
)
SCRIPT(`
// Declare the pattern we want to extract, and then apply it to our input text
var re = /([A-Z]*)/;
var m = re.exec(text1);
// We should have one (or more) groups of character sets now
if (m == null) {
// If not, then return "No"
'No'
} else {
// If we do have at least one character group, return the first (could return many, concatenated, if required)
m[0]
}
`, "text1", [Postcode])