Using GET_GROUP_SELECTION For Record Groups in Oracle Forms

发布时间:2017-1-19 4:08:43 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"Using GET_GROUP_SELECTION For Record Groups in Oracle Forms ",主要涉及到Using GET_GROUP_SELECTION For Record Groups in Oracle Forms 方面的内容,对于Using GET_GROUP_SELECTION For Record Groups in Oracle Forms 感兴趣的同学可以参考一下。

Using GET_GROUP_SELECTION For Record Groups in Oracle Forms

Retrieves the sequence number of the selected row for the given group. Suppose you want to get a particular column value from a record group for the all rows or for particular rows, then you can use get_group_selection built-in to perform the task.

Example:

/*
Built-in: GET_GROUP_SELECTION Example: Return a comma-separated list (string) of the selected part  numbers from the presumed existent PARTNUMS record group.
*/
FUNCTION Comma_Separated_Partnumbers
RETURN VARCHAR2 IS
tmp_str VARCHAR2(2000);
rg_id RecordGroup;
gc_id GroupColumn;
the_Rowcount NUMBER;
sel_row NUMBER;
the_val VARCHAR2(20);
BEGIN
rg_id := Find_Group(’PARTNUMS’);
gc_id := Find_Column(’PARTNUMS.PARTNO’);
/*
Get a count of how many rows in the record group have been marked as "selected"
*/
the_Rowcount := Get_Group_Selection_Count( rg_id );
FOR j IN 1..the_Rowcount LOOP
/*
Get the Row number of the J-th selected row.
*/
sel_row := Get_Group_Selection( rg_id, j );
/*
Get the (VARCHAR2) value of the J-th row.
*/
the_val := Get_Group_CHAR_Cell( gc_id, sel_row );
IF j = 1 THEN
tmp_str := the_val;
ELSE
tmp_str := tmp_str||’,’||the_val;
END IF;
END LOOP;
RETURN tmp_str;
END;


上一篇:一次完整的HTTP请求所经历的7个步骤
下一篇:php 过滤js字符串代码

相关文章

相关评论