dbScriptCommandsb3SAP0<@<??>TDB00DBOS'VĠLi
Y
@
A
0t&9"@8]
hE !n"#$%=6OperatorArgsPurposeTypeNoArgsExplanationExampleA@@Scripts2(((((2(((((NormalInterRecordGlobalMathlib%&Z[-[a] ... [n]Subtract2 or more arguments, each of which must be a number&F![arg]Not1 argumentReturns true if [arg] is false.%&Z[*[a] ... [n]Multiply2 or more arguments, each of which must be a number(+ %0 (* %1 4)) add field 0 to 4*(field 1)#$XY/[a] ... [n]Divide2 or more arguments, each of which must be a number+,8?[test] [t] [f]Conditional3 argumentsIf the first, [test], is true (non-zero) returns the result contained in [t]. Otherwise, returns the result in [f].(? (eq %0 10) 100 -100) if field 0 equals 10, return 100, else return -100 !UV+[a] ... [n]Add2 or more arguments, each of which must be a number(+ %0 %1) add fields 0 and 1 together%&:xall[a] ... [n]Do All1 or more argumentsEvaluate each argument and return the result of the last one.(all 5) just return the constant 5*+?and[a] ... [n]Logical And1 or more argumentsReturns 1 if all arguments evaluate to true. Returns 0 otherwise.+23GDbr[test] [res-0] ...[res-n]Branch2 or more argumentsThe first [test] must be an int. The other elements are treated as a list indexed from 0 to n. If [test] <= 0, return the result contained in [res-0]. If [test] >= n where n is the index of the last arg, return [res-n]. Else return the [test]th element"#Gccbrt[n]Cube Root 1 argument, which must be a number.Returns the cube root of n. !EFceil[n]Ceiling 1 argument, which must be a number.45@7dur[a]Cast an integer as a duration1 argumentCasts the argument as a duration. Currently, this only works for integer type fields. The integer value will be interpreted as the number of minutes since midnight January 1, 1904, and displayed as the number of days, hours and minutes since then(dur (- (int %1) (int %2))). Iif %1 and %2 are
dates this will give the difference between these
dates in days, hours and minutes."#Oeq[a] [b]Equality2 arguments, each of which must be a numberReturns true if they are numerically equivalent.(eq %1 2) !FTexp[n]Exponent 1 argument, which must be a number. Returns 10^n.%&JKfabs[n]Absolute Val 1 argument, which must be a number."45ooffr[fld] [off] [d]Field From Record2 or 3 arguments, the first 2 of which must be an integerThe first argument is the field to be retrieved. (As in the design view, fields are numbered beginning with 0). The second argument is the record offset. That is, the relative location of the target record from the current record. If a third argument is p(sort 1 1)(+ %0 (ffr 1 1)) This script sorts first sorts the database so that field 1 is ascending in value. Then for each record, it adds the value of field 0 in the current record to the value of field 1 in the next record. !"filt[name]Filter1 argument, which must correspond to the name of a filter (set up using the 'Configure Filter' dialog in the list view)BCflr[n]Floor 1 argument, which must be a number.:gcdGet Current date. Added in db 1.0.3'(Tge[a] [b]Greater-Equal2 arguments, each of which must be a numberReturns true if [a] is greater than or equal to [b].&'S|gt[a] [b]Greater-Than2 arguments, each of which must be a numberReturns true if [a] is greater than [b].!"Gkhypo[x] [y]Hypot2 arguments, which must be numbers. Returns square root of (x^2 + y^2)."#.int[a]Cast to Int1 argumentCasts the argument as an integer value. Limited support, but it works for dates and times.(int %1)$%Qle[a] [b]Less-Equal2 arguments, each of which must be a numberReturns true if [a] is less than or equal to [b].!"Gblg[n]Binary Log 1 argument, which must be a number. Returns log (base 2) of n."#Hcln[n]Natural Log 1 argument, which must be a number. Returns log (base e) of n.A]log[n]Log 1 argument, which must be a number. Returns log (base 10) of n.#$Pvlt[a] [b]Less-Than2 arguments, each of which must be a numberReturns true if [a] is less than [b].'(6ml[name] [args]Mathlib>1 argument. The first argument is a string, with the name of the Mathlib function and the remaining arguments are doubles. The number of arguments is determined by the needs of the Mathlib function invoked. (ml sqrt %2) returns the square root of the value in field two%ZnowTime0 argumentsReturns the time (hours:min) when the script was run()=or[a] ... [n]Logical Or1 or more argumentsReturns 1 if one or more arguments evaluates to true. Returns 0 otherwise.!"FSpow[x] [y]Power 2 arguments, which must be numbers.Returns x^y."#/krandRandom Number0 argumentsThis function generates a random integer greater than zero.ABrnd[n]Round1 argument, which must be a number.'(Tyseq[a] [b]String-Equal2 arguments, each of which must be a stringReturns true if [a] is equal to [b].$%\Fsort[fld] [up?]Sort2, 4, or 6 arguments, each of which must be an integerThe first argument determines what field to use for sorting. The second argument is 0 iff the records should be sorted from high to low (descending), arguments 3,4 and 5,6 have properties identical to arguments 1 & 2 respectively.(sort 0 1 ) sorts database on the first field$%Jhsqrt[n]Square Root 1 argument, which must be a number. Returns the square root of n.(ml sqrt %2) returns the square root of the value in field two()Usstr[a] [b]Is-SubString2 arguments, each of which must be a stringReturns true if and only if [a] contains the string [b].%MtodyDate argumentseturns the date when the script was run(eq (int %0 )(int (tody ))) checks if field %0 = today's date