zhangrui
asked on
what's wrong with it?
hi, all
pls point the wrong 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_el ement_labe l('Field_P op_List',l ist_index) ;
ItemName:=get_block_proper ty(:global .blk_name, First_Item );--get the first field name
--set values to field name pop list with a cycle
CompareName:=get_item_prop erty(:glob al.blk_nam e||'.'||It emName,Pro mpt_Text);
cur_Field_Name:=get_item_p roperty(:g lobal.blk_ name||'.'| |ItemName, column_nam e);
FieldType:=get_item_proper ty(:global .blk_name| |'.'||cur_ Field_Name ,DataType) ;
loop
if Cur_Disp_Name=CompareName or Cur_Disp_Name=cur_Field_Na me then
found:=true;
-- message(FieldType);
-- pause;
exit;
end if;
ItemName:=get_Item_propert y(:global. blk_name|| '.'||ItemN ame,NextIt em);
CompareName:=get_item_prop erty(:glob al.blk_nam e||'.'||It emName,Pro mpt_Text);
cur_Field_Name:=get_item_p roperty(:g lobal.blk_ name||'.'| |ItemName, column_nam e);
FieldType:=get_item_proper ty(:global .blk_name| |'.'||cur_ Field_Name ,DataType) ;
exit when(ItemName=get_block_pr operty(:gl obal.blk_n ame,Last_I tem));
end loop;
if found=false then
if Cur_Disp_Name=CompareName or Cur_Disp_Name=cur_Field_Na me 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_Lis t');
ADD_LIST_ELEMENT('Block2.C ompare_Com bo_List',1 ,'“™˜°',1) ;
ELSIF UPPER(FieldType)='DATE' or UPPER(FieldType)='NUMBER' then
clear_list('Block2.Compare _Combo_Lis t');
ADD_LIST_ELEMENT('Block2.C ompare_Com bo_List',6 ,'•s“™˜°', 6);
ELSE
clear_list('Block2.Compare _Combo_Lis t');
ADD_LIST_ELEMENT('Block2.C ompare_Com bo_List',1 ,'“™˜°',1) ;
end if;
----THE WRONG BLOCK,HOW TO CORRECT IT?????????
if UPPER(FieldType)='DATE' then
set_item_property('conditi on_input_t ext',forma t_mask,'yy yy/mm/dd') ;
elsif UPPER(FieldType)='NUMBER' then
set_item_property('conditi on_input_t ext',forma t_mask,'FM 999999');
ELSE
NULL;
end if;
end;
pls point the wrong 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
Cur_Disp_Name:=get_list_el
ItemName:=get_block_proper
--set values to field name pop list with a cycle
CompareName:=get_item_prop
cur_Field_Name:=get_item_p
FieldType:=get_item_proper
loop
if Cur_Disp_Name=CompareName or Cur_Disp_Name=cur_Field_Na
found:=true;
-- message(FieldType);
-- pause;
exit;
end if;
ItemName:=get_Item_propert
CompareName:=get_item_prop
cur_Field_Name:=get_item_p
FieldType:=get_item_proper
exit when(ItemName=get_block_pr
end loop;
if found=false then
if Cur_Disp_Name=CompareName or Cur_Disp_Name=cur_Field_Na
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
clear_list('Block2.Compare
ADD_LIST_ELEMENT('Block2.C
ELSIF UPPER(FieldType)='DATE' or UPPER(FieldType)='NUMBER' then
clear_list('Block2.Compare
ADD_LIST_ELEMENT('Block2.C
ELSE
clear_list('Block2.Compare
ADD_LIST_ELEMENT('Block2.C
end if;
----THE WRONG BLOCK,HOW TO CORRECT IT?????????
if UPPER(FieldType)='DATE' then
set_item_property('conditi
elsif UPPER(FieldType)='NUMBER' then
set_item_property('conditi
ELSE
NULL;
end if;
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.