superarraybuild
ARRAY
,
SEPARATOR
,
DATABASE
,
QUERY
,
GENERATE
,
OPTIONS
,
MAXTICKS
,
MAXRECORDS
,
SKIPRECORDS
,
CACHELEVEL

The superarraybuild statement scans a database to create a text array. This statement is is similar to arraybuild, but with a number of additional options (see Text Arrays).


Parameters

This statement has ten parameters:

array – is the variable or field that will contain the new array. If you use a field for this parameter it must be a text field.

separator – is the separator character for the output array.

database – is the database that will be scanned. This database must be currently open. If this parameter is "" then the current database will be scanned.

query – is a true/false formula that determines whether a record should be included in the output array. For example, if the output array should only contain records where the first name begins with A the conditional formula should be First beginswith "A" or First[1,1]="A".

generate – is a formula that Panorama uses to build the output array. For example, if you want the output array to include the name and phone number the formula might be First+" "+Last+" "+Phone.

options – is a numeric formula that specifies various options. If the parameter is 0 then the default options are used. At the present time there are only two options: 1 = restart scan where previous scan left off, and 2 = scan selected records only (like arrayselectedbuild ). You can combine multiple options by adding them together, for example 3 would specify both selected records only and restart scan where previous scan left off. (This parameter is optional.)

maxticks – is a numeric parameter specifies the maximum amount of time before the scan is aborted. If zero, the scan will continue until the entire database is scanned no matter how much time it takes. If non-zero then the time is specified in “ticks”, where each tick is 1/60th of a second. For example if you want to scan for a maximum of 1/4 second MaxTicks would be 15, for 1/2 second it would be 30. (This parameter is optional.)

maxrecords – is a numeric parameter specifies the maximum number of records to include in the output array. If zero, there is no limit. If non-zero then scanning will stop when the requested number of matching records (as determined by the conditional formula) have been found. If the value is negative then SuperArrayBuild will scan in reverse. For example, you could use the value –1 to scan for the last record in the database that matches the conditional formula. (This parameter is optional.)

skiprecords – is a numeric parameter that tells SuperArrayBuild to skip over the first few matching records. If zero, no records are skipped. For example, this can be used to generate partial lists - records 1–10, then 11–20 (by skipping the first 10), then 21–30 (by skipping the first 20), etc. (This parameter is optional.)

cachelevel – should be set to zero. The LiveClairvoyance custom procedure uses this parameter to speed up searches, however, the operation of this parameter is otherwise not documented and is for ProVUE use only. Setting this parameter to a non-zero value will probably cause missing data in the output array. (This parameter is optional.)


Description

This statement builds an array from information in any open database.

This example builds an html table listing the first ten contacts in San Francisco, with their phone numbers.

local  webtable
superarraybuild
    webtable,
    cr(),
    "Contacts",
    State="CA" and City="San Francisco"
    "<tr><td>"+Name+"</td><td>"+Phone+"</td><tr>"
    0,0,10,0,0
webTable="<table>"+webTable+"</table>"

Here is a similar example builds an html table listing the next ten contacts in San Francisco (11–20).

 local  webtable
superarraybuild
    webtable,
    cr(),
    "Contacts",
    State="CA" and City="San Francisco"
    "<tr><td>"+Name+"</td><td>"+Phone+"</td><tr>"
    0,10,10,0,0
webTable="<table>"+webTable+"</table>"

This statement may be used in any view.


Error Messages

Assorted error messages – If the formula supplied by the user contains an error, the operation is aborted and the error is returned.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now the last five parameters are optional (and all will default to zero if omitted)..