Suites: Helix Design Suite, Helix Data Suite, Required Suite, Standard Suite, AppleScript Types

Helix Data Suite

Helix Data SuiteLegacy events for accessing Helix record data. (The CallHelix events)
«suite ChXo»

Commands

Use

use (verb)Command for access to Helix for data manipulation. (from Helix Data Suite)
«event ChXoChWo»

Description

Legacy Notes: The original CallHelix scripting addition supported just one syntax:

  • CallHelix {parameters} selector (action number)

CallHelix 2.0 (and Helix Scripting) supported this along with these new forms:

  • CallHelix {parameters} action (action text)
  • use {parameter list} to (action text)

Because CallHelix is an anachronism, Helix supports only the use {parameters} to (action text) syntax.

Users familiar with the Helix Scripting syntax should be able to switch from using Helix Scripting as a bridge to Helix to scripting Helix directly using this suite. This legacy implementation of Helix data access is limited in scope. The primary limitation is that there is no mechanism for specifying a query: the default query is always used to restrict data access. The workaround is to post the query parameters into a ‘global’ relation and use an abacus construct to build the query from those stored values.

When the optional "record ids" parameters was not used, Helix Scripting did not return the Record IDs. This is flipped in Helix: Record IDs are always returned unless this parameter is passed with a value of false.

The optional parameter that is used to specify "delimiters" in Helix Scripting is obsolete: it is completely ignored by Helix.

The optional parameter 'target' has been removed. Scripts should now target the appropriate application directly.

Function Syntax

set theResult to «event ChXoChWo» list of text ¬
     «parameter CHdo» action ¬
     «parameter CHkD» list of text ¬
     «parameter CHrI» boolean

Result

list of anythingThe specific elements of the reply vary depending on the action.

Parameters

Parameter
Required
Type
Description
direct parameter required list of text Parameter list. The specific elements of the list vary depending on the action.
delimiters
«parameter CHkD»
optional list of text Specify field and record delimiters (in that order) to use when retrieving data as a list. Ignored: Helix now always determines the delimiters from the view when retrieving records.
record ids
«parameter CHrI»
optional boolean Return Helix"s internal Record IDs along with the record data. Record IDs are returned by default in the retrieved data record. To suppress Record IDs, pass this as false.
to
«parameter CHdo»
required action The action to perform. See the list of actions for details.

Classes

Retrieved data record

retrieved data record (noun)An AppleScript record containing data for one Helix record. The Helix record data is in the helix record item, and the internal Record ID (used for deleting records) is in the record id item. Use get helix record of syntax to access the record data. Subform records are returned in discreet records, prefixed with a additional delimiter for each level of subform nesting.
«class CHdD»

Properties

Property
Access
Type
Description
class
«property pcls»
get type class The class of the object
item
helix record
«property Crdd»
get text or list of text The user data for the Helix record. The fields are returned as a list or string, depending on which action is specified.
properties
«property pALL»
get record A record with all the properties of the item.
item
record id
«property CriD»
get integer The internal RecordID for the Helix record. To delete a record, you must know its internal RecordID. Be aware that although a RecordID will not change, a specific record may acquire a new RecordID if it is moved via posting or an export/delete/import operation

Superclass

The retrieved data record class inherits elements and properties from item.

Enumerations

Action

action (enumeration)Which of the 17 legacy actions to do.
«class CHda»

Constants

Constant
Description
check view state
«constant Chhc»
For testing: Use to determine if a view exists and if it is a list. Direct Parameter is {collection, user, password, relation, view, [true/false]}. Returns nothing. The sixth parameter is optional, and is used to test if the view allows entry: if true and the view is a list, error 200 is returned.
close process
«constant CHcp»
Terminate an open ProcessID. Direct Parameter is a single ProcessID. Returns nothing. It is important to close a process when you are finished with it. The number of simultaneous processes that can be open at one time is controlled by the application license.
create process for retrieve
«constant CHrs»
Open a process for retrieving data in segments from the specified view. Direct Parameter is {collection, user, password, relation, view}. Returns a ProcessID.
create process for store
«constant CHss»
Open a process for store one or more records using the specified view. Direct Parameter is {collection, user, password, relation, view}. Returns a ProcessID.
delete recordID
«constant CHdR»
See "delete records"
delete recordIDs
«constant CHdz»
Using a previously acquired ProcessID, delete one or more records from the collection, using the view specified when the ProcessID was requested. Direct Parameter is {ProcessID, RecordID, [RecordID, ]} The number of RecordIDs that can be sent in one event statement is limited by a preference setting. Returns integer count of records deleted. RecordIDs are acquired when retrieving data.
get partial view data
«constant CHrA»
Using a previously acquired ProcessID, retrieve a range of records from the view specified when the ProcessID was requested. Direct parameter is {ProcessID, [Start Record], [How Many To Get], [Indent Subform Records]}. Returns one or more retrieved data records. Start Record is the zero-count ordinal record number of the first record to get. How Many To Get is the number of records to get. Indent Subform Records (a boolean, default is true) controls whether leading field delimiters are used to indicate subform records. See get view data as listfor returned data format.
get view data as Helix data
«constant CHgR»
Deprecated. Using a previously acquired ProcessID, retrieve a subset of records from the view specified when the ProcessID was requested. See get view data as string for direct parameter details. Returns an AppleScript list of records in legacy (CallHelix 1.x) format.
get view data as list
«constant CHrL»
Using a previously acquired ProcessID, retrieve a subset of records from the view specified when the ProcessID was requested. See get view data as string for direct parameter format. See retrieve records as list for returned data format. Set Indent Subform Records to false to suppress list item prefixing.
get view data as string
«constant CHgS»
Using a previously acquired ProcessID, retrieve a subset of records from the view specified when the ProcessID was requested. Direct parameter is {ProcessID, DataType} when DataType is 0 (Icon Names) or 1 (Header Data); {ProcessID, DataType, Start Record, How Many To Get, [Indent Subform Records]} when DataType is 2 (Record Data). See retrieve records as string for returned data format. Set Indent Subform Records to false to suppress delimiter prefixing.
get view summary
«constant CHwd»
After a ProcessID has been requested, use this command to delay until the specified view is ready for action. (Optimized views reduce delays.) Direct parameter is {ProcessID}. Returns a process ready record containing {record count, field delimiter, record delimiter}.
retrieve records as list
«constant CHor»
Get every record on the specified view. Direct parameter is {collection, user, password, relation, view}. Returns an AppleScript list of Helix records. Field data is returned as an AppleScript list. Subform records are returned as discreet records, prefixed with an additional empty list item for each level of subform nesting.
retrieve records as string
«constant CHaS»
Get every record on the specified view. Direct parameter is {collection, user, password, relation, view}. Returns an AppleScript list of Helix records. Field data is returned as a string with field and record delimiters included. Subform records are returned as discreet records, prefixed with an additional field delimiter for each level of subform nesting.
store one record
«constant CHos»
Store a text string (with embedded field delimiters) in Helix. Direct parameter is {collection, user, password, relation, view, record data}. See store records for returned data format. Data that fails validation or type checking results in error 1000.
store record
«constant CHmS»
See store records
store records
«constant CHsM»
Using a previously acquired ProcessID, store one or more records in the view specified when the ProcessID was requested. Direct parameter is {ProcessID, record data, [record data, ]} Each record data parameter is a text string (with embedded field delimiters) to be stored as a record. The number of RecordIDs that can be sent in one event statement is limited by a preference setting. Returns a list of flags indicating success/failure for each attempt.
test view for readiness
«constant CHpr»
Deprecated: Use get view summary instead.

Where Used

The action enumeration is used in the following ways:

to parameter of the use command/event

Records

Process ready record

process ready record (record)Record type returned by the get view summary action.
«class CHdR»

Properties

Property
Access
Type
Description
field delimiter
«property CHfD»
get text The field delimiter for the view. (Specified in Helix RADE)
record count
«property CHrf»
get integer The number of records available from the specified view. (The default query for the view is used.)
record delimiter
«property CHrD»
get text The record delimiter for the view. (Specified in Helix RADE)