Link to home
Start Free TrialLog in
Avatar of zhangrui
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_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,'“™˜°',1);
      ELSIF UPPER(FieldType)='DATE' or UPPER(FieldType)='NUMBER' then
      clear_list('Block2.Compare_Combo_List');
      ADD_LIST_ELEMENT('Block2.Compare_Combo_List',6,'•s“™˜°',6);
      ELSE
      clear_list('Block2.Compare_Combo_List');
      ADD_LIST_ELEMENT('Block2.Compare_Combo_List',1,'“™˜°',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;
ASKER CERTIFIED SOLUTION
Avatar of Helena Marková
Helena Marková
Flag of Slovakia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial