Use application messages to display these types of information:
NOTE: The types of application messages described here are generated through application database code (stored procedures, triggers, etc.) and/or in the IDO layer (IDO custom assemblies, etc.). Messages that are generated at the client are not applicable here and do not reference or use the messages that are contained in these Application tables.
Application messages are stored in the system and are invoked in response to user or system operations. Messages can be constructed with both literal strings and variable values substituted and inserted into the message when it is invoked.
Messages are identified and invoked with a unique message number that is assigned to the message when it is constructed.
Typically, the unique message number consists of an alphanumeric prefix that identifies the application or its owner, followed by an autonumbered suffix that is created and applied when the message is constructed. You are not required to follow this model, but it provides the best way to identify and locate messages.
For example, your organization is called WonderWare, and you have an application called IssueTrack. You can create and designate a message number prefix like "WW-IssTr-" to identify all messages used in conjunction with this application. If you add an autonumbering suffix to this, you can then create messages for your application without worrying about maintaining unique message numbers. Using this process also allows you to locate all messages designed for use with this application.
To create this type of message numbering:
For information about constructing messages, see the next section.
The Message Num column on this form is defined as a TBD (To Be Determined) field, which means that, when you create a message and save it, the system automatically uses the prefix and assigns the next available number as the suffix.
Note: Predefined core messages assigned to and used by Mongoose have the prefix "MG_". Other Mongoose-based applications might have and use other prefixes; for example, "SL_" for SyteLine-related messages, "SM_" for Service Management-related messages, and so on.
A message can be constructed in such a way that values of various parameters can be picked up and used dynamically when the message is invoked. This is done with the use of substitution parameters that are evaluated when the message is invoked and run-time values substituted for the parameters.
These substitution parameters are indicated in a message by the use of an ampersand (&) followed by a number or letter. Examples: &5 and &C
Possible sources of values for these substitution parameters include:
When constructing a message with substitution parameters, make sure the code that invokes the message contains the correct number of values for the substitutions.
To invoke the message at run-time, insert an expression into your code at the point where you want to call the message. This expression must use the MESSAGE parameter function.
This message requires 14 parameters as follows:
An example of a call for this message might look like this:
MESSAGE("E=NoExistforIs5", "@serial", "@serial.ser_num", V(SerNum)
, "@item"
, "@serial.whse", V(Whse)
, "@serial.item", V(Item)
, "@serial.loc", V(Loc)
, "@serial.lot", V(Lot)
, "@rsvd_inv.import_doc_id", V(ImportDocId)
)
At action execution time, this might evaluate to the following string:
There exists no Serial Number where S/N is S/N1234 for Item that has [Whse: MAIN] and [Item: BK-27000-0007] and [Location: STOCK] and [Lot: LOT00012345] and [Import Doc Id: DocId000123456].
You can construct calls to display multiple messages simultaneously. To do this, use multiple MESSAGE expressions separated by pipe ( | ) symbols. The pipe symbol concatenates the messages.
MESSAGE("E=NoExistforIs5", "@serial", "@serial.ser_num", V(SerNum)
, "@item"
, "@serial.whse", V(Whse)
, "@serial.item", V(Item)
, "@serial.loc", V(Loc)
, "@serial.lot", V(Lot)
, "@rsvd_inv.import_doc_id", V(ImportDocId)
)
| MESSAGE("E=AppLockFail3")
At run time, this concatenation might evaluate to this message conversation:
There exists no Serial Number where S/N is S/N1234 for Item that has [Whse: MAIN] and [Item: BK-27000-0007] and [Location: STOCK] and [Lot: LOT00012345] and [Import Doc Id: DocId000123456].
Lock request was chosen as a deadlock victim.
Maintain Application Messages form
MESSAGE, Event Parameter Functions
General Parameters form