11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CREATE_GROUP_FROM_QUERY built-in<br />

Description<br />

Creates a record group with the given name. The record group has columns representing each column<br />

you include in the select list of the query. Add rows to the record group with the POPULATE_GROUP<br />

built-in.<br />

Note: If you do not pass a formal column name or alias for a<br />

column in the SELECT statement, <strong>Form</strong> <strong>Builder</strong> creates ICRGGQ with<br />

a dummy counter . This happens whenever the column name<br />

would have been invalid. The first dummy name-counter always<br />

takes the number one. For example, the query SELECT 1 + 1 FROM<br />

DUAL would result in a column named ICRGGQ_1.<br />

Syntax<br />

FUNCTION CREATE_GROUP_FROM_QUERY<br />

(recordgroup_name VARCHAR2,<br />

query VARCHAR2,<br />

scope NUMBER,<br />

array_fetch_size NUMBER);<br />

58<br />

Built-in Type unrestricted function<br />

Returns RecordGroup<br />

Enter Query Mode yes<br />

Parameters<br />

recordgroup_name The name of the record group. When <strong>Form</strong> <strong>Builder</strong> creates the record<br />

group object it also assigns the object a unique ID of type RecordGroup.<br />

query A valid SQL SELECT statement, enclosed in single quotes. Any columns<br />

retrieved as a result of the query take the data types of the columns in the<br />

table. If you restrict the query to a subset of the columns in the table, then<br />

<strong>Form</strong> <strong>Builder</strong> creates only those columns in the record group<br />

scope Specifies whether tlhe record group can be used only within the current<br />

form or within every form in a multi-form application. Takes the following<br />

constants as arguments:<br />

FORM_SCOPE Indicates that the record group can by used only within the current<br />

form. This is the default value.<br />

GLOBAL_SCOPE Indicates that the record group is global, and that it can be used<br />

within all forms in the application. Once created, a global record group persists for<br />

the remainder of the runtime session.<br />

array_fetch_size Specifies the array fetch size. The default array size is 20.<br />

CREATE_GROUP_FROM_QUERY restrictions<br />

• If a global record group is created from (or populated with) a query while executing form A, and the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!