This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > EnsPortal.RecordMapper


class EnsPortal.RecordMapper extends EnsPortal.Template.devPage

Ensemble RecordMapper Development Page. This page lets users construct a RecordMap definition (used to pull data out of flat files and map them into an object representation).

Property Inventory

Method Inventory


parameter CSSINCLUDES = ensemble/Ensemble_RecordMapper.css;
Inherited description: Comma-separated list of additional CSS include files for the page. If this page is using CSS3 then the CSS3INCLUDES parameter is used (if defined).
parameter DEFAULTVIEWMODE = list;
If this page has multiple views, this is its initial display mode.
parameter EDITRESOURCE = %Ens_Code:WRITE,%Ens_RecordMap:WRITE;
User needs WRITE permissions on either the %Ens_Code or the %Ens_RecordMap resource to make changes on this page.
parameter JSINCLUDES = zenCSLM.js;
Inherited description: Comma-separated list of additional JS include files for the page.
parameter PAGENAME = Record Mapper;
Displayed name of this page.
parameter RESOURCE = %Ens_Code:READ,%Ens_RecordMap:READ;
User needs READ permissions on either the %Ens_Code or the %Ens_RecordMap resource to view this page.


property %map as EnsLib.RecordMap.Model.Record;
Property to temporarily contain model during page load.
Property methods: %mapGet(), %mapGetSwizzled(), %mapIsValid(), %mapNewObject(), %mapSet()
property blockSuperEvent as %ZEN.Datatype.integer;
Temporary flag to indicate when a new item has been added to the RecordMap. The flag is used to ensure the item is selected after being created, by stopping the row containing the "add" button from selected after creating the new item.
Property methods: blockSuperEventDisplayToLogical(), blockSuperEventGet(), blockSuperEventIsValid(), blockSuperEventLogicalToDisplay(), blockSuperEventLogicalToOdbc(), blockSuperEventNormalize(), blockSuperEventSet()
property canViewFileSystem as %Boolean [ InitialExpression = $system.Security.Check("%Ens_ViewFileSystem","USE") ];
Is the user permitted to access the fileSelect popup.
Property methods: canViewFileSystemDisplayToLogical(), canViewFileSystemGet(), canViewFileSystemIsValid(), canViewFileSystemLogicalToDisplay(), canViewFileSystemLogicalToXSD(), canViewFileSystemNormalize(), canViewFileSystemSet(), canViewFileSystemXSDToLogical()
property currItem as %ZEN.Datatype.integer [ InitialExpression = -1 ];
ID (index number, 0-based) of current selected item.
Property methods: currItemDisplayToLogical(), currItemGet(), currItemIsValid(), currItemLogicalToDisplay(), currItemLogicalToOdbc(), currItemNormalize(), currItemSet(), currItemTypeDisplayToLogical(), currItemTypeGet(), currItemTypeIsValid(), currItemTypeLogicalToDisplay(), currItemTypeLogicalToOdbc(), currItemTypeNormalize(), currItemTypeSet()
property currItemType as %ZEN.Datatype.string;
Type of the current selected item.
Property methods: currItemTypeDisplayToLogical(), currItemTypeGet(), currItemTypeIsValid(), currItemTypeLogicalToDisplay(), currItemTypeLogicalToOdbc(), currItemTypeNormalize(), currItemTypeSet()
property errNameCollision as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Name already exists: %1") ];
Property methods: errNameCollisionDisplayToLogical(), errNameCollisionGet(), errNameCollisionIsValid(), errNameCollisionLogicalToDisplay(), errNameCollisionLogicalToOdbc(), errNameCollisionNormalize(), errNameCollisionSet()
property generatedClasses as list of %ZEN.Datatype.string;
List of classes generated by a given RecordMap after the Generate option is selected.
Property methods: generatedClassesBuildValueArray(), generatedClassesCollectionToDisplay(), generatedClassesCollectionToOdbc(), generatedClassesDisplayToCollection(), generatedClassesDisplayToLogical(), generatedClassesGet(), generatedClassesGetObject(), generatedClassesGetObjectId(), generatedClassesGetSwizzled(), generatedClassesIsValid(), generatedClassesLogicalToDisplay(), generatedClassesLogicalToOdbc(), generatedClassesNormalize(), generatedClassesOdbcToCollection(), generatedClassesSet(), generatedClassesSetObject(), generatedClassesSetObjectId()
property lastLoc as %ZEN.Datatype.string (ZENURL = "LOC");
CSV-string used to remember last location across page redraws, especially involving popups.
Property methods: lastLocDisplayToLogical(), lastLocGet(), lastLocIsValid(), lastLocLogicalToDisplay(), lastLocLogicalToOdbc(), lastLocNormalize(), lastLocSet()
property msgAddSeparator as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Add Separator") ];
Property methods: msgAddSeparatorDisplayToLogical(), msgAddSeparatorGet(), msgAddSeparatorIsValid(), msgAddSeparatorLogicalToDisplay(), msgAddSeparatorLogicalToOdbc(), msgAddSeparatorNormalize(), msgAddSeparatorSet()
property msgDocReadOnly as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("This record map is read only") ];
Property methods: msgDocReadOnlyDisplayToLogical(), msgDocReadOnlyGet(), msgDocReadOnlyIsValid(), msgDocReadOnlyLogicalToDisplay(), msgDocReadOnlyLogicalToOdbc(), msgDocReadOnlyNormalize(), msgDocReadOnlySet()
property msgMakeComposite as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Make Composite") ];
Property methods: msgMakeCompositeDisplayToLogical(), msgMakeCompositeGet(), msgMakeCompositeIsValid(), msgMakeCompositeLogicalToDisplay(), msgMakeCompositeLogicalToOdbc(), msgMakeCompositeNormalize(), msgMakeCompositeSet(), msgMakeCompositeTooltipDisplayToLogical(), msgMakeCompositeTooltipGet(), msgMakeCompositeTooltipIsValid(), msgMakeCompositeTooltipLogicalToDisplay(), msgMakeCompositeTooltipLogicalToOdbc(), msgMakeCompositeTooltipNormalize(), msgMakeCompositeTooltipSet()
property msgMakeCompositeTooltip as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Click to make this field a composite") ];
Property methods: msgMakeCompositeTooltipDisplayToLogical(), msgMakeCompositeTooltipGet(), msgMakeCompositeTooltipIsValid(), msgMakeCompositeTooltipLogicalToDisplay(), msgMakeCompositeTooltipLogicalToOdbc(), msgMakeCompositeTooltipNormalize(), msgMakeCompositeTooltipSet()
property recordAsName as %ZEN.Datatype.string;
Property methods: recordAsNameDisplayToLogical(), recordAsNameGet(), recordAsNameIsValid(), recordAsNameLogicalToDisplay(), recordAsNameLogicalToOdbc(), recordAsNameNormalize(), recordAsNameSet()
property recordMap as %ZEN.Datatype.string (ZENURL = "MAP");
Name of RecordMap being viewed.
Property methods: recordMapDisplayToLogical(), recordMapGet(), recordMapIsValid(), recordMapLogicalToDisplay(), recordMapLogicalToOdbc(), recordMapNormalize(), recordMapSet()
property sampleFile as %ZEN.Datatype.string (ZENURL = "sampleFile");
Name of current sample file (on server).
Property methods: sampleFileDisplayToLogical(), sampleFileGet(), sampleFileIsValid(), sampleFileLogicalToDisplay(), sampleFileLogicalToOdbc(), sampleFileNormalize(), sampleFileSet()
property showSample as %ZEN.Datatype.boolean (ZENURL = "SHOWSAMPLE") [ InitialExpression = 1 ];
Flag to indicate whether the sample file should be displayed.
Property methods: showSampleDisplayToLogical(), showSampleGet(), showSampleIsValid(), showSampleLogicalToDisplay(), showSampleLogicalToOdbc(), showSampleLogicalToXSD(), showSampleNormalize(), showSampleSet(), showSampleXSDToLogical()
property tipAddField as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Add a new field") ];
Property methods: tipAddFieldDisplayToLogical(), tipAddFieldGet(), tipAddFieldIsValid(), tipAddFieldLogicalToDisplay(), tipAddFieldLogicalToOdbc(), tipAddFieldNormalize(), tipAddFieldSet()
property tipCSVWizard as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a record map from a CSV-style sample") ];
Property methods: tipCSVWizardDisplayToLogical(), tipCSVWizardGet(), tipCSVWizardIsValid(), tipCSVWizardLogicalToDisplay(), tipCSVWizardLogicalToOdbc(), tipCSVWizardNormalize(), tipCSVWizardSet()
property tipDelete as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Delete the current RecordMap") ];
Property methods: tipDeleteDisplayToLogical(), tipDeleteGet(), tipDeleteIsValid(), tipDeleteLogicalToDisplay(), tipDeleteLogicalToOdbc(), tipDeleteNormalize(), tipDeleteSet()
property tipGen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this record map and generate target") ];
Property methods: tipGenDisplayToLogical(), tipGenGet(), tipGenIsValid(), tipGenLogicalToDisplay(), tipGenLogicalToOdbc(), tipGenNormalize(), tipGenSet()
property tipMoveItemDown as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Move this item down") ];
Property methods: tipMoveItemDownDisplayToLogical(), tipMoveItemDownGet(), tipMoveItemDownIsValid(), tipMoveItemDownLogicalToDisplay(), tipMoveItemDownLogicalToOdbc(), tipMoveItemDownNormalize(), tipMoveItemDownSet()
property tipMoveItemUp as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Move this item up") ];
Property methods: tipMoveItemUpDisplayToLogical(), tipMoveItemUpGet(), tipMoveItemUpIsValid(), tipMoveItemUpLogicalToDisplay(), tipMoveItemUpLogicalToOdbc(), tipMoveItemUpNormalize(), tipMoveItemUpSet()
property tipNew as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Create a new record map") ];
Property methods: tipNewDisplayToLogical(), tipNewGet(), tipNewIsValid(), tipNewLogicalToDisplay(), tipNewLogicalToOdbc(), tipNewNormalize(), tipNewSet()
property tipOpen as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Open a saved record map") ];
Property methods: tipOpenDisplayToLogical(), tipOpenGet(), tipOpenIsValid(), tipOpenLogicalToDisplay(), tipOpenLogicalToOdbc(), tipOpenNormalize(), tipOpenSet()
property tipRemoveItem as %ZEN.Datatype.caption [ InitialExpression = $$$TextJS("Remove this item") ];
Property methods: tipRemoveItemDisplayToLogical(), tipRemoveItemGet(), tipRemoveItemIsValid(), tipRemoveItemLogicalToDisplay(), tipRemoveItemLogicalToOdbc(), tipRemoveItemNormalize(), tipRemoveItemSet()
property tipSave as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this record map") ];
Property methods: tipSaveAsDisplayToLogical(), tipSaveAsGet(), tipSaveAsIsValid(), tipSaveAsLogicalToDisplay(), tipSaveAsLogicalToOdbc(), tipSaveAsNormalize(), tipSaveAsSet(), tipSaveDisplayToLogical(), tipSaveGet(), tipSaveIsValid(), tipSaveLogicalToDisplay(), tipSaveLogicalToOdbc(), tipSaveNormalize(), tipSaveSet()
property tipSaveAs as %ZEN.Datatype.caption [ InitialExpression = $$$Text("Save this record map with a new name") ];
Property methods: tipSaveAsDisplayToLogical(), tipSaveAsGet(), tipSaveAsIsValid(), tipSaveAsLogicalToDisplay(), tipSaveAsLogicalToOdbc(), tipSaveAsNormalize(), tipSaveAsSet()


method %OnAfterCreatePage() as %Status
This class method callback is called just before the server-side page object is created.
method %OnGetPageName() as %String
Get the (localized) name of the page.
method %OnGetTitle() as %String
Get the (localized) title string for the page.
clientmethod Composite(name, rectype, required, annotation, ignored) [ Language = javascript ]
Client-side constructor for a Composite object.
method DrawSampleData(pSeed As %String) as %Status
Draw the contents of the Data Sample panel.
method DrawTableHeader(pSeed As %String) as %Status
Draw the contents of the Header section.
clientmethod Field(name, rectype, required, datatype, index, width, trailingData, params, repeating, annotation, ignored) [ Language = javascript ]
Client-side constructor for a Field object.
method GetInternalName() as %String
Inherited description: Return the internal name of the current document, including the three letter extension in upper-case. For example, MyPackage.MyClass.CLS would be the internal name for the class MyPackage.MyClass. Subclasses MUST override this method.
classmethod GetLastMap() as %String
method GetRecordDefinition(ByRef pParms, Output pObject As %RegisteredObject) as %Status
Get Record definition for JSON provider.
classmethod IsSubclassOf(classname As %String, superclass As %String) as %Integer [ ZenMethod ]
classmethod LoadSampleFilename(recordMap="") as %String [ ZenMethod ]
Load the last used sample file for the current user.
method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) as %Status
Get information to display in the ribbon bar.
clientmethod Record(name, charEncoding, targetClassname, rectype, required, label, padChars, padFromLeft, recTerm, fieldSep, seps, contents) [ Language = javascript ]
A client-side constructor for a Record object. It can be invoked using either:
var record = new zenPage.Record(args...)
var record = new this.Record(args...)
where the latter would be invoked from a ClientMethod.
classmethod SaveSampleFilename(recordMap="", filename) [ ZenMethod ]
Save the sample file name for the current user so that it is initialised for later sessions.
classmethod SetLastMap(pMapName As %String = "") [ ZenMethod ]
method SubmitHandler(pCommand As %String, pProvider As %ZEN.Auxiliary.jsonProvider, ByRef pObject As %RegisteredObject, Output pResponse As %RegisteredObject) as %Status
Process submitted JSON content based on the object created
clientmethod addItem(type, row, path) [ Language = javascript ]
Add a new item to the table. One needs to supply the type of the container object, the row of the container, and the path to the clicked element, which is specified by integers separated by _ (underscore) characters.
clientmethod addSeparator(sepValue, inRender) [ Language = javascript ]
clientmethod addUndoAction() [ Language = javascript ]
Remember the current state in the undo buffer.
clientmethod adjustSizes() [ Language = javascript ]
Adjust sizes of components on the page.
clientmethod applyDetails() [ Language = javascript ]
Apply changes from detail form.
clientmethod canUndo() [ Language = javascript ]
Return true if it is possible to undo an action
clientmethod changeSampleFile() [ Language = javascript ]
Launch the file dialog to select a sample file.
clientmethod changeTargetClassname(newRecordName) [ Language = javascript ]
Check that the Target Classname is changed along with the RecordMap name
clientmethod chooseSCMenu(menuName, commandName, saveFlags) [ Language = javascript ]
Handle a source control menu selection.
clientmethod clearUndoBuffer() [ Language = javascript ]
Clear the undo buffer.
clientmethod cloneObject(obj, clone) [ Language = javascript ]
Create a clone of the given object.
clientmethod deleteRecordMap() [ Language = javascript ]
clientmethod doSave(force, noload, alertWindow) [ Language = javascript ]
Method to save the RecordMap to disk without generating any classes.
clientmethod editSimpleBatch() [ Language = javascript ]
clientmethod findRowForItem(item) [ Language = javascript ]
Find the row number in the table for the given model item. This must be called after the table has been rendered.
clientmethod getCSSForType(type) [ Language = javascript ]
Find the css class for the given row type.
clientmethod getClientModel() [ Language = javascript ]
Inherited description: Get the jsonProvider object on the client. Subclasses MUST override this method to return the jsonProvider.
clientmethod getCompositeDepth(composite) [ Language = javascript ]
Get the distance to a given composite's "furthest" field, which represents the number of separators it needs.
clientmethod getCurrentLocation() [ Language = javascript ]
Returns the index of the currently selected item and the offsets of the main window in a comma separated list. It returns the empty string "" if no item is selected.
clientmethod getCurrentName() [ Language = javascript ]
Return the current name of the class/object being modified
clientmethod getLastName(type, parentName) [ Language = javascript ]
Helper method to get the last name used for a specific parent object.
clientmethod getNextName(type, parentName) [ Language = javascript ]
Helper method to calculate the next name to use for a given parent.
clientmethod getRecordDepth(record) [ Language = javascript ]
Get the expected number of separators for a given record.
clientmethod getRecordObject() [ Language = javascript ]
Return the RecordMap definition object.
clientmethod getRowDetail(field) [ Language = javascript ]
clientmethod invokeAfterUserAction(input, userContext) [ Language = javascript ]
Client-side coordinator of calls to the AfterUserAction callback in the core source control class.
clientmethod itemSelected(item) [ Language = javascript ]
Item selected within the Finder.
clientmethod loadCSVWizard(url) [ Language = javascript ]
Helper method for loading the CSV Wizard with the current sample file.
clientmethod loadEditor(recordMapName, location, newMap, showSample, renamed) [ Language = javascript ]
Load the page for the specified RecordMap.
clientmethod logout() [ Language = javascript ]
To avoid unloadHandler loop, override logout() and do the unload check ourselves.
clientmethod moveItem(row, path, direction) [ Language = javascript ]
Helper method to move items in the table. row is the row in the rowIndex, path is the path to item in the diagram, and direction is either the text string 'up' or 'down'. Note that any direction value != 'up' is assumed to mean 'down'.
clientmethod newRecordMap() [ Language = javascript ]
Add a new RecordMap.
clientmethod onBatchClassChange() [ Language = javascript ]
clientmethod onDocumentSaveComplete(contentUpdated) [ Language = javascript ]
Ensure we redraw the table if the model was updated.
clientmethod onFieldNameChange(newName) [ Language = javascript ]
Remember last entered name
clientmethod onFieldTypeChange() [ Language = javascript ]
Modify available input fields based on whether an entry is a Field or Composite.
clientmethod onIgnoreFieldChange(noApply) [ Language = javascript ]
clientmethod onPaddingCharChange(newValue, isRadio, noApply) [ Language = javascript ]
clientmethod onPopupAction(popupName, action, value) [ Language = javascript ]
This client event is fired when the a popup page launched from this page fires an action.
clientmethod onRecEscapingChange(escapeValue, noApply) [ Language = javascript ]
clientmethod onRecTermChange(newValue, isRadio, noApply) [ Language = javascript ]
clientmethod onRecordNameChange(newName) [ Language = javascript ]
Coordinate events which need to occur when the RecordMap's name is changed.
clientmethod onRecordTypeChange(recordType, promptUser) [ Language = javascript ]
Modify the available input fields based on the Record type
clientmethod onlayoutHandler(load) [ Language = javascript ]
Adjust sizes of components on the page.
clientmethod onunloadHandler() [ Language = javascript ]
Check if user really wants to exit if they have not saved changes
clientmethod openRecordMap() [ Language = javascript ]
Launch the finder dialog to select a RecordMap.
clientmethod removeItem(type, row, path) [ Language = javascript ]
Remove a row from the table.
clientmethod removeSeparator(index) [ Language = javascript ]
clientmethod reverseString(str) [ Language = javascript ]
clientmethod rowClick(type, row) [ Language = javascript ]
Handle user click on a row in the table.
clientmethod saveRecordMap(doGenerate, showDialog) [ Language = javascript ]
Save the current model. This includes initial validation on the RecordMap.
clientmethod selectItem(type, row, force) [ Language = javascript ]
Select a row in the table.
clientmethod selectNewItem(newItem, newType, blockSuper) [ Language = javascript ]
Helper method: select an item, make sure it is visible and give focus to the details panel. The blockSuper variable is used to control whether the next selectItem() event will be honored: when adding an item from the + button, the new parent's onclick() will be triggered, and we want to keep the new element in focus.
clientmethod setDescription(desc) [ Language = javascript ]
Update the description (annotation) of this record map.
clientmethod setFieldType(newType, update) [ Language = javascript ]
clientmethod setReadOnly(readOnly) [ Language = javascript ]
Inherited description: Set readOnly to the value of readOnly. Subclasses MUST implement this method to update the controls on the page so that the page's behaviour actually matches the value of the readOnly flag.
clientmethod setViewModeHandler(mode As %Library.String, oldmode As %Library.String) [ Language = javascript ]
Do the actual work of updating the view to match the current view mode.
clientmethod toggleDisclosure(key) [ Language = javascript ]
User click on disclosure icon in table.
clientmethod toggleSampleDiv(show) [ Language = javascript ]
Hide/display the sample file section in the display
clientmethod undo() [ Language = javascript ]
Undo the most recent change.
clientmethod updateLastName(name, type, parentName) [ Language = javascript ]
Helper method to record the last name used on the client.
clientmethod updateTable() [ Language = javascript ]
Update the contents of the model table.
clientmethod validateHexChars(chars) [ Language = javascript ]
clientmethod validateRecord() [ Language = javascript ]
Basic validation to check that:
  • Record and Composite elements have children
  • Enough separators have been defined for delimited records

Inherited Members

Inherited Properties

Inherited Methods