Lesson 2

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

In Oracle Forms or when defining actions in Oracle E-Business Suite Form

Personalization, if you want to include a message with line breaks (to start a new
sentence from a new line within the same message), using \n (newline character)
alone might not work as expected due to the context or how the application
processes escape characters.

For scenarios where you need a line break in a text message within Oracle Forms or
EBS Form Personalization, try the following approaches:

CHR Function: Use the CHR function with the ASCII code for a newline, which is 10.
For example, to include a line break, you would use CHR(10) as part of your message
string. If you're setting this in a form personalization or a PL/SQL block, it
would look something like this: 'First line' || CHR(10) || 'Second line'.

Message Built Using PL/SQL Block: If you're crafting a message within a PL/SQL
block or similar context, assembling the message with CHR(10) for line breaks is a
standard approach. This can be useful in form triggers or stored procedures where
you're generating output messages.

Directly in Form Personalization Action: If you're defining an action to show a


message and want to include a line break within that message, you might be limited
by what the Form Personalization tool directly supports in terms of character
interpretation. However, trying CHR(10) as part of the message content is the first
alternative. For example, in the "Message Text" field of a "Show Message" action,
you would write your message as 'Your message here' || CHR(10) || 'Continue message
here'.

Using Set_Alert_Property for Custom Alerts: If the message needs to be more complex
or requires styling that the standard message box does not support, consider using
alerts that you've predefined in the form. You can use SET_ALERT_PROPERTY to define
the text of the alert, incorporating CHR(10) for line breaks. Then, you can display
the alert using SHOW_ALERT.

Here is a practical example if you are using a message in form personalization:

Action Type: Choose "Execute a PL/SQL Code".


PL/SQL Code: Enter something like this, incorporating your specific logic:asfasf

You might also like