zoukankan      html  css  js  c++  java
  • 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;


  • 相关阅读:
    MSSQL 2012 密钥
    同台同时多开DELPHI2007的解决办法
    DELPHI快捷键
    Delphi编码规范
    解决Delphi 2010启动时卡死并报“displayNotification: 堆栈溢出”错误
    Test
    sched python 定时任务
    springboot2.x 整合redis
    springboot 忽略null属性值,不传递
    logback.xml 配置使用
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220179.html
Copyright © 2011-2022 走看看