DdsField.ErrorMessage Property

Gets or sets the conditions that control the error message for the field.


BegProp ErrorMessage Access(*Public) Type(ErrMsgProperty)
   BegGet;  BegSet

Property Values

ErrMsgProperty object containing the conditional values controlling the error message for the field.


To set the ErrorMessage property, click on the right hand side of the property window and the ErrorMessage Property Editor window will display as shown below.

Enter the message as the Value and the indicator expression ( Condition) under which the message will be displayed. For example, a Value of "Re-enter your selection" and a Condition of 30 meaning the message you entered will be displayed when *IN30 is True. See Conditional Properties Overview and Monarch Web Control Indicator Expression Tester for more information on setting the conditional indicators and testing your expressions.


DDS ERRMSG keyword allows specifying a response-indicator using the following format: ERRMSG('message-text' [response-indicator]), where [response-indicator] is an optional numeric indicator from 01 to 99. Monarch migrates ERRMSG as a property called ErrorMessage where the message-text is not quoted and the optional response-indicator is separated by blank space. The format used is the following: ErrorMessage='message-text [response-indicator] : conditional-indicator-expression'. For example, 30 (at position 7 and 8) and ERRMSG('Re-enter your selection') keyword, where the error message is conditioned on option indicator 30, and no response indicator is specified, would be migrated as ErrorMessage='Re-enter your selection : 30'. If the 'message-text' happens to end in a word that looks like an option indicator; for example 'Re-enter selection for Customer 07', then, instead of migrating the keyword as ErrorMessage='Re-enter selection for Customer 07 : 30' which the runtime would confuse 07 as a response indicator, it is necessary to resolve the ambiguity and migrate the keyword as ErrorMessage='Re-enter selection for Customer 07. : 30', thus eliminating the possibility of 07 to be confused with response indicator 07 - notice the dot appended at the end of the message-text -.

Runtime Considerations for DdsCharField and DdsDecField:

When the control's ErrorMessage or ErrorMessageId properties condition expression evaluates to TRUE at runtime, Monarch Framework appends "_Error" to the control's CssClass property. For example, if the CssClass property is "DdsCharField", then at runtime, the control's generated HTML class attribute would be class="DdsCharField_Error".


Namespace: ASNA.Monarch.WebDspF

Assembly: ASNA.Monarch.WebDspF.DLL

Platforms: Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows 7, Windows 8 Pro, Windows 10 Pro