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.

GET_GROUP_SELECTION built-in<br />

Description<br />

Retrieves the sequence number of the selected row for the given group.<br />

Syntax<br />

FUNCTION GET_GROUP_SELECTION<br />

(recordgroup_id RecordGroup,<br />

selection_number NUMBER);<br />

FUNCTION GET_GROUP_SELECTION<br />

(recordgroup_name VARCHAR2,<br />

selection_number NUMBER);<br />

Built-in Type unrestricted function<br />

Returns NUMBER<br />

Enter Query Mode yes<br />

Parameters<br />

recordgroup_id Specifies the unique ID that <strong>Form</strong> <strong>Builder</strong> assigns to the record group when<br />

it creates it. Use the FIND_GROUP built-in to return the ID to a variable.<br />

The data type of the ID is RecordGroup.<br />

recordgroup_name Specifies the name of the record group that you gave to the group when<br />

creating it.<br />

selection_number Identifies the selected rows in order of their selection. For example, given<br />

that rows 3, 7, and 21 are selected, their respective selection values are 1,<br />

2, and 3. The selection_number argument takes a value of the NUMBER<br />

data type.<br />

GET_GROUP_SELECTION examples<br />

182<br />

/*<br />

** Built-in: GET_GROUP_SELECTION<br />

** Example: Return a comma-separated list (string) of the<br />

** selected part numbers from the presumed<br />

** existent PARTNUMS record group.<br />

*/<br />

FUNCTION Comma_Separated_Partnumbers<br />

RETURN VARCHAR2 IS<br />

tmp_str VARCHAR2(2000);<br />

rg_id RecordGroup;<br />

gc_id GroupColumn;<br />

the_Rowcount NUMBER;<br />

sel_row NUMBER;<br />

the_val VARCHAR2(20);<br />

BEGIN<br />

rg_id := Find_Group(’PARTNUMS’);<br />

gc_id := Find_Column(’PARTNUMS.PARTNO’);<br />

/*<br />

** Get a count of how many rows in the record group have

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

Saved successfully!

Ooh no, something went wrong!