?
Solved

what's wrong with it?

Posted on 2003-03-31
3
Medium Priority
?
1,506 Views
Last Modified: 2012-08-13
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;
0
Comment
Question by:zhangrui
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Helena Marková earned 80 total points
ID: 8237923
I think that the only thing is missing a block:

if UPPER(FieldType)='DATE' then
            set_item_property('YOUR_BLOCK.condition_input_text',format_mask,'yyyy/mm/dd');
elsif UPPER(FieldType)='NUMBER' then
            set_item_property('YOUR_BLOCK.condition_input_text',format_mask,'FM999999');
ELSE
          NULL;
end if;

Henka
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question