<< Click to Display Table of Contents >> Navigation: Administration and Configuration > ST_CONFIG Entries > EarthSoft.EDP > EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
Limits the commit type in EDP Professional for a given format (may be user-specific). For more information on commit type limits, see Limit Commit Types in EDP further down in this article.
EQuIS Version: 7
Namespace: EarthSoft.EDPEddCustomHandler
Products Affected: EDP
Required Modules: Professional
ST_CONFIG |
VALUE |
REMARK |
VALID VALUES |
---|---|---|---|
CONFIG_SECTION |
EarthSoft.EDP.EddCustomHandler.
<User Name>\EarthSoft.EDP. |
There are two alternate forms of this section. One is the string literal, and the other prepends that with a user name as found in ST_USER. |
|
CONFIG_KEY |
<format name>
|
Required |
The name of the format file with filename extension |
OBJECT_TYPE |
CommitMode
|
Required |
|
OBJECT_VALUE |
None Merge MergeOnly Update UpdateOnly Replace ReplaceOnly Format |
Choose One |
|
STRING_VALUE |
<boolean> |
Choose One |
True = Show Option False = Hide Option |
Remarks:
Commit Mode or Update Mode defines how EDP should handle a row from an EDD Package when a record matching its unique constraint exists in the EQuIS data.
•None – Insert Only
•Merge – Insert & Merge
•MergeOnly – Merge Only
•Update – Insert & Update
•UpdateOnly – Update Only
•Replace – Insert & Replace
•ReplaceOnly – Replace Only
•Format – Format Specific (controlled by the custom handler)
Typically, this setting is accomplished with several records—one for each Update Mode. For example, the following would restrict all users except john_doe to "Insert Only" and "Insert & Merge" when committing EDDs using the EQEDD format.
CONFIG_SECTION |
CONFIG_KEY |
OBJECT_TYPE |
OBJECT_VALUE |
STRING_VALUE |
---|---|---|---|---|
EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
None |
True |
EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Merge |
True |
EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Update |
False |
EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Replace |
False |
EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Format |
False |
john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
None |
True |
john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Merge |
True |
john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Update |
True |
john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Replace |
True |
john_doe\EarthSoft.EDP.EddCustomHandler.ShowUpdateMode |
EQEDD |
CommitMode |
Format |
True |
Control of a specified format's Commit types as well as the Commit type's name can also be implemented via a format's custom handler (e.g., *.vb file). To control which commit types are available, the format's custom handler must override method ShowUpdateMode. Controlling the commit types from a format will void any commit types declared in ST_CONFIG.
The following example would allow only the "Insert Only" commit type, except for the user Bob, who would have commit types "Insert Only" and "Insert and Merge".
Public Overrides Function ShowUpdateMode(mode As EarthSoft.Common.Data.Connection.UpdateModes, _
formatName As String, cn As EarthSoft.Common.Data.Connection) As Boolean
Select Case mode
Case EarthSoft.Common.Data.Connection.UpdateModes.None
Return True
Case EarthSoft.Common.Data.Connection.UpdateModes.Merge
If cn.User.Name = "Bob" Then
Return True
Else
Return False
End If
Case Else
Return False
End Select
End Function
Copyright © 2024 EarthSoft, Inc. • Modified: 09 Oct 2020