Home » Developer & Programmer » Forms » what's wrong with it?
what's wrong with it? [message #81897] Mon, 31 March 2003 03:48
zhangrui
Messages: 37
Registered: March 2003
Member
hi, all
pls how to correct the wrong(below '--the wrong block,how to correct????????????') in the unit:
declare list_index number(2);
itemname varchar(40);
cur_Disp_Name varchar(40);
cur_Field_Name varchar(40);
CompareName varchar2(40);
FieldType varchar2(12);
found boolean:=false;
begin
list_index:=To_Number(Name_In('Field_Pop_List'));
Cur_Disp_Name:=get_list_element_label('Field_Pop_List',list_index);
ItemName:=get_block_property(:global.blk_name,First_Item);--get the first field name
--set values to field name pop list with a cycle
CompareName:=get_item_property(:global.blk_name||'.'||ItemName,Prompt_Text);
cur_Field_Name:=get_item_property(:global.blk_name||'.'||ItemName,column_name);
FieldType:=get_item_property(:global.blk_name||'.'||cur_Field_Name,DataType);
loop
if Cur_Disp_Name=CompareName or Cur_Disp_Name=cur_Field_Name then
found:=true;
-- message(FieldType);
-- pause;
exit;
end if;
ItemName:=get_Item_property(:global.blk_name||'.'||ItemName,NextItem);
CompareName:=get_item_property(:global.blk_name||'.'||ItemName,Prompt_Text);
cur_Field_Name:=get_item_property(:global.blk_name||'.'||ItemName,column_name);
FieldType:=get_item_property(:global.blk_name||'.'||cur_Field_Name,DataType);
exit when(ItemName=get_block_property(:global.blk_name,Last_Item));
end loop;
if found=false then
if Cur_Disp_Name=CompareName or Cur_Disp_Name=cur_Field_Name then
found:=true;
message(cur_field_name);
pause;
end if;
end if;
-- set the compare droplist's value
if UPPER(FieldType)='CHAR' OR UPPER(FieldType)='VARCHAR2' then
clear_list('Block2.Compare_Combo_List');
ADD_LIST_ELEMENT('Block2.Compare_Combo_List',1,'0',1);
ELSIF UPPER(FieldType)='DATE' or UPPER(FieldType)='NUMBER' then
clear_list('Block2.Compare_Combo_List');
ADD_LIST_ELEMENT('Block2.Compare_Combo_List',6,'s0',6);
ELSE
clear_list('Block2.Compare_Combo_List');
ADD_LIST_ELEMENT('Block2.Compare_Combo_List',1,'0',1);
end if;
----THE WRONG BLOCK,HOW TO CORRECT IT?????????
if UPPER(FieldType)='DATE' then
set_item_property('condition_input_text',format_mask,'yyyy/mm/dd');
elsif UPPER(FieldType)='NUMBER' then
set_item_property('condition_input_text',format_mask,'FM999999');
ELSE
NULL;
end if;
end;
Previous Topic: DynamicQuery
Next Topic: Conversion from Cobol to Java and Unisys to Oracle
Goto Forum:
  


Current Time: Wed May 08 11:24:49 CDT 2024