DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Form: Using trigger to filter the data

  1. #1
    Join Date
    May 2001
    Posts
    9

    Unhappy

    Hi! Could you please help me please? I am trying to use 'when button pressed-trigger' to filter the data.
    The purpose is :if someone press the button then it will execute only the data that has got the same depot_id and periode.
    Is there any mistake on this trigger?

    set_block_property('m_form1',default_where,'depot_id ='''||:m_form1.depot_id||' and '||
    'periode>='''||:m_form1.f_periode1 ||' and '||
    'periode<='''||:m_form1.f_periode2 );
    Set_Record_Property(:system.cursor_record, 'm_form1', STATUS, QUERY_STATUS);
    execute_query;
    set_block_property('m_form1',default_where,'');

    Thank's in advance!
    (-)

  2. #2
    Join Date
    Aug 2000
    Posts
    462
    I think you're missing some single quotes:

    set_block_property('m_form1',default_where,'depot_id ='''||:m_form1.depot_id||''' and '||
    'periode>='''||:m_form1.f_periode1 ||''' and '||
    'periode<='''||:m_form1.f_periode2||'''');
    Set_Record_Property(:system.cursor_record, 'm_form1', STATUS, QUERY_STATUS);
    execute_query;
    set_block_property('m_form1',default_where,'');


    I'm not sure why you're using set_record_property. What's the point? You could replace that line with go_block('m_form1') then do your execute_query as before. I hope 'm_form1' is the name of a data block. If not, none of this code will work.

    Oracle DBA and Developer

  3. #3
    Join Date
    May 2001
    Posts
    9

    Thanks to kmesser!

    It does works!
    Thank's a lot kmesser for the help !

    Antony
    (-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width