Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle Application Express (APEX): sending emails from multiple select LOV

Oracle Tips by Burleson Consulting

An APEX multiple select list of values (LOV) returns the result in a colon-delimited string in to the item.    Here is a sample LOV definition:

select
   manager_full_name fn,
   manager_e_mail    em
from
   bc_manager
order by fn

SEE CODE DEPOT FOR FULL SCRIPTS

And here is the APEX screen with the multiple select list:

If we select multiple e-mail address from a list, the selected the result will be:

manager@remote-mail.net:boss@company.cc:johnbob@remote-mail.net

To process this list, we can either write a PL/SQL loop to do INSTRs and SUBSTRs to get the values or we can use the APEX built-in functions to process the multiple select items.

APEX provides the string_to_table function in the HTMLDB_UTIL package where it will take the string of values and convert that into an array.   Then you can process through the array for the values.  Here is the syntax for the APEX string to table conversion function:

htmldb_util.string_to_table (
   p_string        in   varchar2,
   p_separator     in   varchar2  default ‘:’)
return 
   htmldb_application_global.vc_arr2;

So a call of 

htmldb_util.string_to_table(‘one:two:three:four:five’)

will result in a array of

one
two
three
four
five

Here is a simple example of using APEX with a multiple select list:

declare
   list_arr2       htmldb_application_global.vc_arr2;
begin
  list_arr2 :=  htmldb_util.string_to_table(‘One:Two:Three’);
  for i in 1..list_arr2.count
  loop
     htp.p(list_arr2(i));
  end loop;
End;
 
SEE CODE DEPOT FOR FULL SCRIPTS
 
For the APEX email function (htmldb_mail), the solution is:
 
declare
  email_recipients HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
begin
 email_recipients := HTMLDB_UTIL.STRING_TO_TABLE(:P1_E_MAIL_LOG);
 FOR i in 1..email_recipients.count
 LOOP
   HTMLDB_MAIL.SEND(
   P_TO       => email_recipients(i),
      ….);
 END LOOP;
End;

SEE CODE DEPOT FOR FULL SCRIPTS

For more information on this topic, see the book "Easy Oracle HTML-DB Application Express ", the best book anywhere on expert APEX development:


APEX support:

For APEX development support just call to gat an Oracle Certified professional for all APEX development projects.

APEX book and code samples:

Easy Oracle HTML-DB Application Express
Create Dynamic HTML with Oracle

Includes online APEX code depot

Buy it now for 30% off - Only $27.95
 

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational