Re: Forms 6i Programming :: 2nd Level Search

From: Nicole <cjz1768_at_worldnet.att.net>
Date: Sat, 07 Oct 2000 00:29:41 GMT
Message-ID: <V7uD5.484$GA1.20002_at_bgtnsc04-news.ops.worldnet.att.net>


Create a field(:master_block.f_search_value) which stores the user's input, and then create a list(:master_block.list_column) which stores the column(A,B,C,D,..etc) so that the user can select which column to search. And then create a button(:master_block.push_button) with when-button-pressed trigger: the code would be look like this:(assuming the search value is in A,)

  go_block('detail_block');
  IF :mastre_block.list_column = 'A' THEN     go_item('detail_block.A');
  ELSIF :mastre_block.list_column = 'B' THEN     go_item('detail_block.B');
 ....
 ....
  END IF;
  FIRST_RECORD;
  LOOP
      EXIT WHEN :SYSTEM.RECORD_STATUS = 'NEW';(this will check if the cursor has moved beyond the last row.)

      IF :SYSTEM.CURRENT_VALUE = :master_block.f_search_value THEN

SET_ITEM_INSTANCE_PROPERTY('detail_block',CURRENT_RECORD,VISSUAL_ATTRIBUTE,V A_NAME);(create a vissual attribute with any colr you like);

      NEXT_RECORD;
  END LOOP;   Hope this will work, good luck

Nicole

sacchow_at_my-deja.com wrote in message <8rl0ot$i1r$1_at_nnrp1.deja.com>...
>
>
>I have a datablock
> and at run-time
> after a query has executed and the block is filled with rows
> I want to provide a feature by which
> a user can search for a value in any column that he/she decides to.
>note: all the rows that met the query criteria in the first place
> are displayed. I am just searching for (one column only) in
> the result-set.
>Example: Say, i have columns A, B, C & D
> It is filled with rows (after a query has executed)
> * Now he/she wants to search for a value in A
> The first record that meets the search value in A is highlighted
> the user then presses some button and the second row having
> the search value in A (if any) is highlighted.
> I do desire to have ALL the rows from the original query
> displayed, otherwise this would be a trivial issue.
>
>Please provide pointers, hints, suggestions, guidance.
>
>Thanks.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Sat Oct 07 2000 - 02:29:41 CEST

Original text of this message