Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_item010.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>POPUPKEY_FROM_QUERY Function</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:16Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="POPUPKEY_FROM_QUERY Function" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="apex_item.htm" title="APEX_ITEM" type="text/html" /> <link rel="up" href="apex_item010.htm" title="POPUPKEY_FROM_" type="text/html" /> <link rel="prev" href="apex_item009.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_item011.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_item.htm" title="APEX_ITEM">APEX_ITEM</a> > POPUPKEY_FROM_</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="apex_item009.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_item011.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="CHDEHBAC" name="CHDEHBAC"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI203" id="AEAPI203"></a>POPUPKEY_FROM_QUERY <a id="sthref566" name="sthref566"></a>Function</h1> <p>This function generates a popup key select list from a SQL query. Similar to other available functions in the <code>APEX_ITEM</code> package, the <code>POPUPKEY_FROM_QUERY</code> function is designed to generate forms with <code>F01</code> to <code>F50</code> form array elements.</p> <a id="sthref567" name="sthref567"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_ITEM.POPUPKEY_FROM_QUERY( p_idx IN NUMBER, p_value IN VARCHAR2 DEFAULT NULL, p_lov_query IN VARCHAR2, p_width IN VARCHAR2 DEFAULT NULL, p_max_length IN VARCHAR2 DEFAULT NULL, p_form_index IN VARCHAR2 DEFAULT '0', p_escape_html IN VARCHAR2 DEFAULT NULL, p_max_elements IN VARCHAR2 DEFAULT NULL, p_attributes IN VARCHAR2 DEFAULT NULL, p_ok_to_query IN VARCHAR2 DEFAULT 'YES', p_item_id IN VARCHAR2 DEFAULT NULL, p_item_label IN VARCHAR2 DEFAULT NULL) RETURN VARCHAR2; </pre> <a id="sthref568" name="sthref568"></a> <p class="subhead2">Parameters</p> <p><a href="#CHDDDHEI">Table: POPUPKEY_FROM_QUERY Parameters</a> describes the some parameters in the <code>POPUPKEY_FROM_QUERY</code> function.</p> <div class="tblformal"><a id="sthref569" name="sthref569"></a><a id="CHDDDHEI" name="CHDDDHEI"></a> <p class="titleintable">POPUPKEY_FROM_QUERY Parameters</p> <table class="Formal" title="POPUPKEY_FROM_QUERY Parameters" summary="This table describes the parameters available in POPUPKEY_FROM_QUERY." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="25%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t12">Parameter</th> <th align="left" valign="bottom" id="r1c2-t12">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t12" headers="r1c1-t12"> <p><code>p_idx</code></p> </td> <td align="left" headers="r2c1-t12 r1c2-t12"> <p>Form element name. For example, <code>1</code> equals <code>F01</code> and <code>2</code> equals <code>F02</code>. Typically, <code>p_idx</code> is a constant for a given column.</p> <p>Because of the behavior of <code>POPUPKEY_FROM_QUERY</code>, the next index value should be <code>p_idx + 1</code>. For example:</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT APEX_ITEM.POPUPKEY_FROM_QUERY (1,deptno,'SELECT dname, deptno FROM dept') dt, APEX_ITEM.HIDDEN(3,empno) eno </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t12" headers="r1c1-t12"> <p><code>p_value</code></p> </td> <td align="left" headers="r3c1-t12 r1c2-t12"> <p>Form element current value. This value should be one of the values in the <code>P_LOV_QUERY</code> parameter.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t12" headers="r1c1-t12"> <p><code>p_lov_query</code></p> </td> <td align="left" headers="r4c1-t12 r1c2-t12"> <p>LOV query used for this popup.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t12" headers="r1c1-t12"> <p><code>p_width</code></p> </td> <td align="left" headers="r5c1-t12 r1c2-t12"> <p>Width of the text box.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t12" headers="r1c1-t12"> <p><code>p_max_length</code></p> </td> <td align="left" headers="r6c1-t12 r1c2-t12"> <p>Maximum number of characters that can be entered in the text box.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t12" headers="r1c1-t12"> <p><code>p_form_index</code></p> </td> <td align="left" headers="r7c1-t12 r1c2-t12"> <p>HTML form on the page in which an item is contained. Defaults to 0 and rarely used.</p> <p>Only use this parameter when it is necessary to embed a custom form in your page template (such as a search field that posts to a different Web site). If this form comes before the <code>#FORM_OPEN#</code> substitution string, then its index is zero and the form opened automatically by Oracle Application Express must be referenced as form 1. This functionality supports the JavaScript used in the popup LOV that passes a value back to a form element.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t12" headers="r1c1-t12"> <p><code>p_escape_html</code></p> </td> <td align="left" headers="r8c1-t12 r1c2-t12"> <p>Replacements for special characters that require an escaped equivalent.</p> <ul> <li> <p><code>&lt;</code> for <code><</code></p> </li> <li> <p><code>&gt;</code> for <code>></code></p> </li> <li> <p><code>&amp;</code> for <code>&</code></p> </li> </ul> <p>This parameter is useful if you know your query will return illegal HTML.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t12" headers="r1c1-t12"> <p><code>p_max_elements</code></p> </td> <td align="left" headers="r9c1-t12 r1c2-t12"> <p>Limit on the number of rows that can be returned by your query. Limits the performance impact of user searches. By entering a value in this parameter, you force the user to search for a narrower set of results.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t12" headers="r1c1-t12"> <p><code>p_attributes</code></p> </td> <td align="left" headers="r10c1-t12 r1c2-t12"> <p>Additional HTML attributes to use for the form item.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t12" headers="r1c1-t12"> <p><code>p_ok_to_query</code></p> </td> <td align="left" headers="r11c1-t12 r1c2-t12"> <p>Range of values is <code>YES</code> and <code>NO</code>. If <code>YES</code>, a popup returns first set of rows for the LOV. If <code>NO</code>, a search is initiated to return rows.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r12c1-t12" headers="r1c1-t12"> <p><code>p_item_id</code></p> </td> <td align="left" headers="r12c1-t12 r1c2-t12"> <p>ID attribute of the form element.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r13c1-t12" headers="r1c1-t12"> <p><code>p_item_label</code></p> </td> <td align="left" headers="r13c1-t12 r1c2-t12"> <p>Invisible label created for the item.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref570" name="sthref570"></a> <p class="subhead2">Example</p> <p>The following example demonstrates how to generate a popup select list from a SQL query.</p> <pre xml:space="preserve" class="oac_no_warn"> SELECT APEX_ITEM.POPUPKEY_FROM_QUERY (1,deptno,'SELECT dname, deptno FROM dept') dt FROM emp </pre></div> <!-- class="refsect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="apex_item009.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_item011.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de