Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Get Value into HTML Text region (Oracle 10g,Win 7 32 bit,Apex 4.0)
Get Value into HTML Text region [message #621869] Tue, 19 August 2014 05:17 Go to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Hello,

I have one HTML Text(with shortcuts) region and in region one region source area is there with some text like:-
<span style="font-size:23pt;color:blue;font-weight:bold;">Demo Test Development v1.2</span>

Here 1.2 is the version number but i want to get this version number with the help of function like :-
create or replace function get_version return number
as
begin 
return 1.2;
end; 


So when i use get_version function into the region source area like:-

<span style="font-size:23pt;color:blue;font-weight:bold;">Demo Test Development v||get_version</span>

But its not working so,Is there any via to get the value from the function into the html text region on region source area.


Thanks ,
Xandot

[Updated on: Tue, 19 August 2014 05:30]

Report message to a moderator

Re: Get Value into HTML Text region [message #621872 is a reply to message #621869] Tue, 19 August 2014 05:59 Go to previous messageGo to next message
Littlefoot
Messages: 21530
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That won't work that way, as far as I can tell. Region type should be PL/SQL, and region source would then be your function (get_version). Though, I'd return whole string ("Demo Test Development v1.2"), not just "1.2".
Re: Get Value into HTML Text region [message #621878 is a reply to message #621872] Tue, 19 August 2014 06:30 Go to previous messageGo to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Can i use one text field(P101_VERSION) for store value from function and then text value populate in source like:-
v('P101_VERSION') or &P101_VERSION

<span style="font-size:23pt;color:blue;font-weight:bold;">Demo Test Development v||v('P101_VERSION')</span>
Re: Get Value into HTML Text region [message #621879 is a reply to message #621878] Tue, 19 August 2014 06:50 Go to previous messageGo to next message
Littlefoot
Messages: 21530
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't know; try, and then you tell me.

Here's how I do that: my PL/SQL region's source is
p_copyright;

The procedure looks like this:
   PROCEDURE p_copyright
   IS
   BEGIN
      HTP.prn ('<div style="text-align:center;">');
      HTP.prn ('<table style="margin: 0 auto;">');
      HTP.prn ('<tr>');
      HTP.prn ('<td>');
      HTP.prn ('<p style="font-size:9px; color:gray">');
      HTP.prn ('© 2012 - ' || TO_CHAR (SYSDATE, 'yyyy') || ' Littlefoot ');
      HTP.prn ('</p>');
      HTP.prn ('</td>');
      HTP.prn ('</tr>');
      HTP.prn ('</table>');
      HTP.prn ('</div>');
   END p_copyright;
Re: Get Value into HTML Text region [message #621880 is a reply to message #621879] Tue, 19 August 2014 07:02 Go to previous messageGo to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Solution :-
-------------------------------------------
Create one Hidden Page item P101_VERSION and create Before Header computation on P101_VERSION
computation Type: PLSQL EXPRESSION
COMPUTATION : GET_VERSION
then use this page item in region source as
EX. DEMO TEST DEVELOPMENT &P101_VERSION.
------------------------------------------------------
Get_version function used in many procedures so i'm not edit that function in transit your solution is correct.

Thanks for reply littlefoot.

Re: Get Value into HTML Text region [message #621882 is a reply to message #621880] Tue, 19 August 2014 07:08 Go to previous message
Littlefoot
Messages: 21530
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Thank you for the information, I'm glad you solved the problem!
Previous Topic: Set Value When Popup LOV change
Next Topic: Apex Zone
Goto Forum:
  


Current Time: Wed Jan 22 16:27:15 CST 2020