Forum Stats

  • 3,838,255 Users
  • 2,262,346 Discussions


Detect line break in while getting the parameter values in APEX

Niki Dilip
Niki Dilip Member Posts: 13 Blue Ribbon
edited Jul 27, 2022 11:11AM in SQL & PL/SQL

I have a textbox which gets inputs from the user in page1.I am using APEX to create my page 1. On submit the values gets displayed in the page2. The problem is, if the user inputs the data with line breaks in the textbox in page1, the values are getting displayed in the single line in page2. How do i handle it. I am using plsql procedures to display the values in 2nd page via htp.print.

For example: My p1_long_description entered in page 1 as

This is a test script.

It tests for the line break.

Get the values as is.

In page 2 while fetching the values using htp.prn('My long des is :'||:p2_long_description); I am getting it as "This is a test script. It Test for the line break. Get the values as is."

How do i handle this? what should be my approach?

Thanks & Regards,


Best Answer

  • BluShadow
    BluShadow Member, Moderator Posts: 42,122 Red Diamond

    What difficulty are you having implementing it in Apex? It's a straightforward replace. You can do that as part of your query that retrieves the data on the Apex page, or using some Javascript or whatever on the page itself if that's preferable.