Click or drag to resize

MapperExecCmds Enumeration

Namespace:  NetQuarry.Data
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public enum MapperExecCmds
Members
  Member nameValueDescription
ShowInfo2001Show debug information for this mapper -- not yet implemented.
SelectedKeys2002 Obsolete. Return the selected keys (in the form of an ArrayList) -- deprecated, use SelectedKeys(EAPEventArgs).
ValuesFromForm2003 Populate the mapper's fields with values from the Form.
  • Param #1 - The HttpRequest whose form will be used to populate the fields.
Caption2004 Get the mapper's caption string.
  • Flags - CaptionFlags can be provided via the flags parameter.
FilterSave2005Save the mapper's current filter as a SavedFilter and returns the resulting SavedFilter object. The filter is saved as a dynamic filter if there are no items selected in a list or a static filter if there are items selected. Example: SavedFilter flt = mapper.Exec(MapperExecCmds.FilterSave, (FilterAttributes.Temp | FilterAttributes.Hidden | FilterAttributes.DeleteAfterUse), "myFilter") as SavedFilter;
PageInfoSetup2006 Set up the mapper per a PageInfo object.
  • Param #1 - The PageInfo object from which to set up.
  • Param #2 - Optionally, a .Net Page object may be provided.
KeyDisplayCollectionGet2007 Returns a NameValueCollection containing the key names and display text of the current row. Note that if you are populating the collection in order to resolve (expand) a Template from a single mapper with not prefixing or aliasing then you should use TemplateNVCollection for improved performance. Fields may be specifically included and/or excluded using Param #1 and Param #2. If no specific field are included and/or excluded, all fields are returned.
  • Flags - KeyDisplayCollectionFlags specifying behaviour.
  • Param #1 - May contain a semi-colon separated list of keys of specific fields to include. The include fields may be of the form key=alias so that the field's value will be added to the collection by name using the alias instead of the key.
  • Param #2 - May contain a semi-colon separated list of keys of specific fields to exclude.
  • Param #3 - May contain a prefix to be added to the name of all items returned. This allows multiple results from the same mapper to be merged uniquely.
DefaultsFromParent2008 Initialize mapper's default values from the parent mapper where the DefaultFromParent field attribute is set.
  • Param #1 - The parent mapper key or a live mapper must be provided in param #1.
  • Param #2 - The parent RowKey value in param #2 is optional if a live mapper is provided in param #1, but required otherwise.
If a live mapper is provided, but no RowKey, it is assumed that the mapper is already positioned to the appropriate parent record.
ExpressionResolve2009 Resolve the field expression provided in param #1. See ExpressionParser for more information about field expressions. Use ExpressionEscape to escape apparent field references in a string.
  • Flags - ExpressionResolutionFlags can be provided as flags.
  • Param #1 - The field expression to resolve.
  • Param #2 - If the concept of a current field is meaningful, pass its key in param #2. This will be used to resolve "current field" ('[.]') field references.
Note that for historical reasons this command will throw an error if the expression contains an unresolvable field or other syntax error. To suppress exceptions, specify the DoNotThrow flag.
RowKeyPart2010 Extracts the value for the field (specified by key) from the provided RowKey (obtained from the RowKey property).
  • Param #1 - The record's RowKey.
  • Param #2 - The field's Key.
If the field comprises part of the key then its value in the RowKey will be returned (possibly an empty string, but not null). If the field does not comprise part of the RowKey then null will be returned.
Description2011 Get the mapper's resolved description expression string (per the mapper's "description" property). If no description property is specified, the mapper's Caption is returned.
Link2012 Get a link to the current item, page, etc. per MapperLinkFlags flags provided.
BuildKeyFilter2013 Build a filter clause based on a set of keys. The keys can be provided, or, if no keys are provided, the SelectedKeys for the mapper are used. An empty list will still result in a valid filter.
PopulateFromPage2014 Populate the field values from the current post-back page. This command is intended primarily for internal use.
DataSourceType2015 Returns the DBMSType of this mapper's data source. Typically this is the DBMSType of the mapper's Database, but if the mapper is using a live DataTable as its data source, then the DBMSType will be DotNet.
RetrieveDataTable2016 Retrieve a DataTable representing the current mapper's field schema, and, optionally, the mapper's data.
DefaultChanged2017 Informs the mapper whether or not any field has had its DefaultValue changed. This is primarily intended as a mechanism for a field to notify its mapper when its DefaultValue is set programmatically.
  • Param #1 - A value that can be interpretted as a boolean specifying whether or not the default was changed.
HTMLSummary2018 Returns an HTML formatted table summarizing the data for the mapper unless a Table object is provided in param #1 in which case the Table object is returned.
  • Flags - HTMLSummaryFlags.
  • Param #1 - Optionally a Table object to which summary DataRow(s) are added. If no Table is provided, an internal Table is contructed and returned as an HTML string.
  • Param #2 - Optionally provide a semi-colon-separated list of the keys of fields to include in the summary if only certain fields are desired. Even if such a list is provided, fields will only be included if other criteria used to determine summary applicability (e.g. ExcludeFlavor) indicate that they should be included.
  • Param #3 - Optionally, the name of a Template to use for the summary layout instead of standard rendering.
CopyValuesFrom2019 Copies value from the mapper provided in param #1 into this mapper. If no include or exclude list is specified, all field values will be copied where a corresponding field is found in the current mapper. Typically this function is used to copy values from one mapper instance to another instance of the same mapper, but the function can be used to copy from one mapper to another. In either case, values are copied based on corresponding field Keys.
  • Flags - SetValFlags.
  • Param #1 - The mapper from which to copy values.
  • Param #2 - A semi-colon-separated list of fields to include.
  • Param #3 - A semi-colon-separated list of fields to exclude
FieldsDependencyOrdered2020 Retrieves a Fields collection of mapper fields dependency ordered. That is, where one field is dependent on the value in another field (e.g due to DISCRIM), the dependent field follows the field on which it depends. Field values must be populated in dependency-order. See also FieldsUserOrdered. This command is provided primarily for internal use.
GrouperField2021 Retrieves the GroupBox sibling field associated with this field in the mapper, but only if that grouper applies (e.g. grouping only applies in the datasheet if the ShowInList cell attribute is set on the GroupBox field.
  • Flags - MapperExecFlags.
  • Param #1 - The field whose grouper is to be retrieved (required).
If an applicable grouper is found then that IField object is returned, else null is returned.
ItemDescription2022 Get the description for the mapper's current record. This is obtained by resolving the mapper's ItemDescription text for field references.
UserCanFilter2023 This mapper supports a Filter-by-Form (FBF) or other custom user filtering mechanism. Currently this applies to the MapperDatasheet only.
OrderByClause2024 Gets the complete ORDER BY clause for the mapper including current sorting and grouping with !Sort() sort spec resolution.
QueryAggregateData2025 Returns the aggregate values in a DataTable.
ExpressionEscape2026 Escape the provided expression provided such that any syntax that could be interpreted as field references are escaped. The resulting string, when resolved, will yield the original unescaped string. In particular, field references of the form "[fieldref]" will be escaped to "[[fieldref]".
  • Param #1 - The expression to escape.
See ExpressionParser for more information about field expressions. Use ExpressionResolve to resolve field references in a string.
TopNCount2027 Performs a bounded count query using the flags as the max rows to count.
  • Flags - The maximumn number of rows to count.
UploadFiles2028 Upload any files associated with this mapper. This is primarily provided for internal use.
RegisterDevLog2029 Register DevLog information for logging if and only if the mapper's operational query fails.
ApplyViewState2030 .Net populates the ViewState just prior to the PageLoad state of the page life-cycle. In cases where the mapper was bound during the PageInit stage, the ViewState will not have been available and this command may be executed at the start of the PageLoad stage to notify the mapper that the ViewState can now be applied. This command is intended primarily for internal use and should not normally be called from custom application code. The primary beneficiary of this notification is the MapperDatasheet which maintains certain state information (e.g. current sort) in ViewState.
NavTargetSet2031 Sets the NavTarget context under which the mapper is rendering.
GroupingInfo2032 Gets information about current mapper grouping. A GroupingInfo object is returned. Typically this method is called initially with no param #1 provided. This causes the mapper to create a new GroupingInfo object and initialize it by determining the current grouping and setting the Field to the current grouping field. If no grouping is being used, then the GroupingInfo object is still created, but the Field value will be null. In subsequent calls (generally for each row while iterating through a mapper's data rows), that initialized GroupingInfo object is provided as param #1 and the mapper sets the object's grouping information for the current row and returns the same GroupingInfo object.
  • Param #1 - Typically null on initial call, then the resulting GroupingInfo object thereafter.
CloneParent2033 Gets/sets the original mapper from which this mapper was cloned. If this mapper is NOT a clone the the CloneParent will be null.
  • Param #1 - To set the mapper's clone, pass the original mapper in param #1.
PicklistRefresh2034 Tells the mapper to refresh appropriate picklists. At this time only picklists marked as "volatile" will be flushed. Also at this time, volatile picklists will be flushed on any CloneParent and from session cache. This applies to the Picklist specified as the Picklist on each IField in the mapper.
SetPageDebugInfo2035 Add debug info to page HTML for this mapper. On IPageTemplate pages that bind the mapper to the page using BindPage(Page, Boolean), do not invoke this command as the BindPage(Page, Boolean) method will do so.
  • Param #1 - The Page object.
IsUserHiddenField2036 Determines if the provided field has been explicitly hidden by the user. Returns a bool True if so, else False.
ExpandTemplate2037 Expands the Template from the current values in the mapper. Returns the expanded template or null/empty if the template is not found.
  • Flags - Provide ExpandTemplateFlags.
  • Param #1 - Provide the name of the Template to use, or the Template object itself.
  • Param #2 - Optional list of fields to include in the expansion. If null/empty then all fields will be included.
UpdateFullTextIndexField2038 Updates the field specified as the mapper's FullTextField using the mapper's FullTextTemplate to construct a text value upon which the mapper's Full-Text Search (FTS) index is built.
  • Flags - Pass a 1 to force the reindexed field to dirty.
FullTextReIndexMapper2039 Re-index the entire mapper by cloning the current mapper and updating the index field on each. See UpdateFullTextIndexField
  • Flags - Pass a 1 to force reindexed fields to dirty.
SavedFilterApply2040 Applies the provided SavedFilter provided to the mapper. The Filter clause of the SavedFilter is applied as a MapperFilter and any FullTextSearchValue is also applied.
GenerateSelectSQL2041 Generates the SQL for the SELECT portion of the normal query.
SetPageElement2042 Provides the related PageElementInfo object to the mapper. To get the PageElementInfo object, use GetPageElement.
FieldsUserOrdered2043 By default retrieves a Fields collection of mapper fields in the order they should be presented to the user in a datasheet taking any user-customized column order into account. Field visibility is taken into account. Note that field visibility is NOT taken into account when the 0x00000001 bit is set and, in fact, the list may include keys for which no field is defined. Regardless of what type of collection is returned, the collection is guaranteed to not include duplicates. See also FieldsDependencyOrdered.
  • Flags - Pass a 0x00000001 bit to have a StringList of Key values returned instead of a Fields collection.
This command is provided primarily for internal use.
MarkDOMModifiedFields2044 This command interrogates each visible field in its Fields collection to determine which sibling fields may be DOMModified by that field (see DOMModifiedFields). Each such potentially DOMModified field is then marked with the DOMModified attribute. A field is DOMModified if its value is modified in the client Document Object Model (DOM) by javascript. Returns the number of fields marked as DOMModified. This may include fields already so marked.
RowCalcExpr2045 Generates and registers the mapper's RowCalc expression. The RowCalc expression is responsible for applying CalculateValued expressions in detail and list views.
IsGroupingColumns2046 Determines if the mapper is grouping columns. If no fields are specified in param #1, the mapper's entire Fields collection is used.
  • Flags - Pass a 1 if the caption is for use in a list (e.g. Datasheet or Excel export).
  • Param #1 - Optionally provide a Fields collection if only a subset of fields is of interest.
CacheDate2047 Get the date/time of the operational data cache used to populate the mapper on the latest Requery. If the mapper's operational data was not obtained from cache, the date/time will be null.
CacheFlush2048 Flush the operational data cache for the current mapper in its current context. Currently the context is based on the mapper's PageElementInfo from its host page.
CacheInit2049 Initialize the mapper for operational data caching. This should be performed early in the mapper life-cycle, and may be performed as late as the MapperExecSQL event. The operational cache is maintained using the CacheManager and an item is uniquely identified in the cache based on the provided CacheID together with the current user's UserID, from the UserContext.ID.
GetPageElement2050 Get the related PageElementInfo object from the mapper. May be null. To set the PageElementInfo object, use SetPageElement.
GetMessageRelationships2051 Returns the MessageRelationships of rowkey values.
InternalAndLoad2052 Loads and initializes a newly created mapper. This command is intended primarily for internal use.
SetIsNew2053 Sets the internal "new" state of the mapper (read as IsNew). This should be used with caution.
  • Flags - Pass a 1 to instruct the mapper to auto-detect (tests for the existence of a record with the current RowKey in the database.
  • Param #1 - If auto-detect is not specified, the new value for IsNew is taken from this value treated as a boolean value.
GroupingField2054 Returns the IField currently being used to group rows in the datasheet. If mapper is not a datasheet or no grouping is being performed, null is returned. Note that the grouping field is not determined by the datasheet until layout and so not available until the MapperAfterLayout event.
GetFromSQL2055 Generates and returns the full FROM claused used for the SELECT. This includes any FullText filtering as well.
GetHostPane2056 Gets the host pane for this mapper. Currently a non-null value will be returned only in the following cases:
  • ConsoleTemplate - In which case a IConsolePane will be returned.
  • WizardTemplate - When hosted in a WizardGrouper slot in which case a IWizContainerPane will be returned.
This value may be set via SetHostPane, but that is normally performed by the platform.
SetHostPane2057 Sets the host pane for this mapper.
  • Param #1 - Currently a non-null value is expected only in the following cases:
    • ConsoleTemplate - The hosting IConsolePane is expected.
    • WizardTemplate - When hosted in a WizardGrouper slot the hosting IWizContainerPane is expected.
Note that if the provided host identifies its PageElementInfo then the mapper's internal PageElementInfo value is set (obtainable via GetPageElement). This host pane may be obtained via GetHostPane.
GetGeneratedSQL2058 Generates the SQL for the mapper including the select fields, from sql and filter clauses.
LockFields2059 Locks the set of fields specified by a semi-colon delimited list of field names provided in param #1.
  • Param #1 - The set of fields to lock.
SelectedKeysInit2060 Specifies the set of RowKey items that should be initially selected. Currently applies only in Datasheets to set the initial state of any selector checkboxes.
  • Param #1 - One of:
    • A StringSet of RowKey strings.
    • A StringCollection of RowKey strings.
    • A string to be added to the set of selected RowKey strings.
    • null to clear out the selected keys.
The StringSet of keys, or null, is returned.
ClearSchemaCollectionCache2061 Clears the schema collection cache for this mapper
MergeSort2062 Merge two sort clauses. SQL-Server will error if the same column is used more than once in an ORDER BY clause. If that happens on a saved sort there's no way to recover without clearing user preferences. This method will throw out any repeated columns and return the merged clause (with items in the original order). Note that the clauses must NOT include the ORDER BY keywords.
  • Param #1 - The first clause to merge in (may be null/empty).
  • Param #2 - The second clause to merge in (may be null/empty).
PrefNameBase2063 Expose PrefNameBase for current mapper (including any page name decoration)
ButtonClickHandler2064 Gets/sets a DynamicCommandButton control through which button fields should invoke their postback click handling.
GetAliasNameMap2065 Gets a collection of all fields in the mapper that are referenced by another field in the mapper via the referencing field's AliasName. The returned FieldsMap collection maps each field so-referenced to the set of fields referencing it.
GetSelectFields2066 Returns a Fields collection of the fields that will be included in the mapper's SELECT clause ordered in the order in which they will occur in that clause.
GetQueryTopN2067 Returns the ACTUAL TopN used/to-be-used in query, factoring in options and tweaks. The TopN is the maximum number of records to return, and a zero or negative value indicates that no limit should be applied. For SQL-Server a positive TopN will cause a "TOP" clause to be added to the query, e.g. "SELECT TOP 10 postal_code FROM company". Note also that in lists and other multi-record uses the TopN value is typically one greater than the number of records required for display and/or processing. This allows the mapper to determine whether or not additional records exist.
TemplateNVCollection2068 Returns a NameValueCollection containing the key names and display text of the current row. Unlike KeyDisplayCollectionGet this command only adds those fields required by the template and in the form required by the template (e.g. DisplayText, Caption, or RawValue). The requirements of the template are determined by interrogating the template via GetTemplateNodes(ContentResolution).
  • Flags - KeyDisplayCollectionFlags specifying behaviour.
  • Param #1 - The Template that will use the collection, required. A template name may be provided instead of a live template object.
RecordCountSafe2069 Returns the RecordCount (an int) for the mapper, but catches any error that is thrown. Use this exec command instead of RecordCount if you want to guarantee that no error is thrown.
  • Flags - Not used at this time.
  • Param #1 - An optional MapperErrorContext that will be populated if provided. In particular ErrorMessage will be set if an error occurred attempting to obtain the count.
ReuseGridData2070 Informs the Datasheet that it will be using the data rows posted back in the grid rather than requerying. This command is intended solely for internal use.
IsRequestAction2071 Returns true if the mapper is currently performing the specified HttpRequest action, else false. This is generally based on the event target (__EVENTTARGET) from the request. Note that this is primarily intended for internal use and that most of these actions really apply only to the MapperDatasheet.
Diagnose2072 Returns the results of running the mapper diagnostics on the specified mapper per the specified options. Currently the diagnostics results is a list of detected issue in HTML format, but this is subject to change. Currently diagnosis involves instantiating a new instance of the specified mapper, loading it for each of several common flavors, and scanning each loaded flavor for anomalies. The mapper is not requeried. Use Test for testing the mappers requery.
  • Flags - MapperDiagnosticOptions.
  • Param #1 - The key of the mapper to diagnose. If no key is provided the key of the current mapper, if any, is used.
Test2073 Tests the specified mapper and returns the results, per the specified options. Generally testing does involve executing one or more requeries. Currently a null/blank result indicates that no problems were encountered. The most likely non-success result is an error message from a failed requery. Use Diagnose for diagnosing anomalies in the mapper's meta-data.
  • Flags - MapperTestOptions.
  • Param #1 - The key of the mapper to test. If no key is provided the key of the current mapper, if any, is used.
MapperModuleKey2074 Gets the module for the IMapper (from xmt_datamappers.module_key). Note that the ModuleKey is obtained from the mapper's Module and is often misleading in a Console or Wizard.
ValidateRequiredFields2075 Validate the required fields throwing a MissingRequiredFields exception if appropriate. Typically during Save(MapperSaveOptions) the mapper performs required field validation immediately following the RowBeforeInsert and RowBeforeUpdate events. However, if an extension returns HandledByExt in response to one of these events then the required field validation is not performed. In such a case this command can be used to perform the standard required field validation.
GetExportFields2076 Returns a Fields collection from the mapper, representing the set of fields required to be included in an export to Excel. The list of fields is typically those that are currently visible tothe user, but behavior can be modified by passing MapperExportOptions flags.
GetBaseCacheID2077 Returns a string representing the BaseCacheID for the mapper.
GetCacheLife2078 Returns an integer representing the cache life of a mapper.
GetFireAndForgetCount2079 Returns a FireAndForgetCountHelper object that gives you a chance to inspect the status of a specified fire and forget count.
  • Flags - not currently used
  • Param #1 - The count sql for a fire and forget count request.
  • Param #2 - Optional minimum cache date/time. If specified, any count cached prior to this date/time will be ignored.
ClearAllUserFilters2080 Programmatically clear the FBF criteria from a datasheet. Note that you will typically need to re-navigate to the page which has cleared the User Filters If you don't re-navigate, the FBF values may appear back on the page after being posted from page data.
See Also