SAP Knowledge Base Article - Public

3718128 - Additional “1.” automatically added to custom error message

Symptom

A custom error message is created as Message Definition with two sentences, starting with “1)” and “2)”.



However, when the error message is triggered during a workflow approval process, for example, an additional “1.” is automatically added at the beginning of the message.

"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."

Environment

SAP SuccessFactors HCM Suite

Cause

The additional “1.” displayed at the beginning of the message is expected system behavior.

When multiple validation messages are triggered by business rules or by the system, the application automatically numbers them sequentially as “1.”, “2.”, “3.”, and so on. For this reason, the system adds the prefix “1.” even if the custom message already contains manual numbering.

This automatic numbering cannot be disabled.

Resolution

If there is a requirement to display two sentences within the same validation scenario (for example, one rule triggering two messages at the same time), this can be achieved without manually adding “1)” and “2)” in the Message Definition.

Instead of maintaining a single Message Definition that contains both sentences, the text should be split into two separate Message Definitions. Both messages can then be triggered within the same business rule. This allows the system to apply automatic numbering, instead of having numbering manually included in the message text.


Suggested configuration:

  1. Go to Manage Data.
  2. Search for the existing Message Definition.
  3. In the Text field, change the content from:
    "1) <text/sentence 1> [br] 2) <text/sentence 2>"
    to:
    "<text/sentence 1>"
  4. Create a new Message Definition.
  5. In the Text field of the new Message Definition, maintain:
    "<text/sentence 2>"
  6. Go to Configure Business Rules.
  7. Search for the business rule that is triggering the error message.
  8. In the Then section, click Add Expression.
  9. Add a new Raise Message action and select the newly created Message Definition.


Result:

Instead of displaying manually inserted numbering, the system will automatically display the messages in sequence, for example:

  1. <text/sentence 1>
  2. <text/sentence 2>

See Also

Keywords

Message Definition, custom error message, error message, message, workflow approval error, business rule, Configure Business Rules, Manage Data, Raise Message, automatic, message, duplicate, numbering, extra “1.”, numbered, multiple, validation, numbering, workflow, [br], line break, trigger, triggered, 1., extra number, condition, Message Rule, Message Text , KBA , LOD-SF-MDF-RUL , Custom Oject based Business Rules , Problem

Product

SAP SuccessFactors HCM Suite all versions

Attachments

Pasted image.png