lunes, 10 de noviembre de 2025

Oracle forms combo Box with item values

 Pregunta realizada en un forma sobre Oracle forms combo Box with item values.


PREGUNTA REALIZADA:


I have view form which displays the information of customer and items, i want to show the values in view form according to the branch name, if branch name is selected NYC, the sole information about that branch should be displayed, but the problem is i just can see 1 Value from my combo box and the information related to that only.

I have applied PL/SQL procedure which fetches me the values of branch name data, branch_name is column name and trigger when-list-changed and in there i called the program units in which i have procedure name get_list and on main block the trigger is when-windows-activated here also i have called get_list, the code of get_list is below:


sql

 PROCEDURE GET_LIST IS

 where_string varchar2(5000);


 BEGIN

    go_block('CUSTOMER_ORDER');

    IF :BRANCH_NAME IS NOT NULL THEN

    where_string := ' BRANCH_NAME='''||:BRANCH_NAME||''' ';

         end if ;

    set_block_property('CUSTOMER_ORDER',default_where,where_string);

execute_query;  

 END;


the result i get is the values of only one branch_name value and information corresponding to that



RESPUESTA:


ou need to populate the item values, probably from a db table, for BRANCH_NAME when you start to run your forms, possibly through WHEN-NEW-ITEM-INSTANCE or PRE-FORM by using Add_List_Element() method with such a code below :


sql

Declare

  i  pls_integer:= 1;   

Begin

   Clear_List('block1.branch_name');  

   for c in ( select * from yourschema.branches order by branch_code ) 

   loop

     Add_List_Element('block1.branch_name',i,c.branch_name,c.branch_code);

     i:=i+1;

   end loop;

End;


Fuentes

Artículo:   "Populate oracle forms combo Box with item values" Publicado en http://stackoverflow.com/ el 26 ago 2019. Consultado el 07 nov 2025.

URL: http://stackoverflow.com/questions/57653041/populate-oracle-forms-combo-box-with-item-values


No hay comentarios:

Publicar un comentario