3 Replies Latest reply: Oct 12, 2012 1:22 AM by 967903 RSS

    search items one by one

    967903
      hello experts,
      i have a
      text field search_part1 in which i put the item for search
      another text field i send_by which contains items
      a single item comes in list many times.i have to find the item one by one.
      i have make this statement for seraching items

      Declare
      typ varchar2(200);
      L_NAME VARCHAR2(50) := :BLOCK3.SEARCH_PART1;
      begin
      go_block('BLOCK3');
      first_record;
      loop
      if :BLOCK3.SEND_BY = L_NAME then
      go_item('SYSTEM.CURSOR_RECORD');
      exit;
      else
           --MESS( :BLOCK3.SEND_BY||'-'||L_NAME);
      next_record;
      end if;

      if :system.last_record = 'TRUE'
      THEN
      --message('This Item does not exist');
      -- message('This Item does not exist');
      --go_item('BLOCK3.SEND_BY');
      -- clear_item;
      EXIT;
      END IF;
      END LOOP;
      Exception
      when no_data_found
      then
      mess(sqlerrm);
      END;

      bt the problem is that if a single items comes more than one time then it search only one time and next time it exit

      Thanks
      ravi