Validation of fields to search with%

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
  

Poston Thu, 17 Nov 2016 3:06 pm

James, if you solve the problem of% on pre-query, tell us.
spernega
Location: São Paulo - SP

Poston Thu, 17 Nov 2016 3:44 pm

spernega, good afternoon.

Dude, what was done was disables the trigger that made the validation if the field was null or not, that is, desvestimos a Saint to put on another.

But I was not satisfied with this, but for now that's what we got:?
tiago_pimenta
Location: Barretos / SP

Poston Thu, 17 Nov 2016 3:52 pm

Beauty, but think about creating a block of search parameters, you will suffer a little bit less.
But the important thing is to work.

Good luck
spernega
Location: São Paulo - SP

Poston Thu, 17 Nov 2016 3:59 pm

But even with the search block, the situation would be the same. Have an item in this block number that the user would put the "% " and would give the same error:(
tiago_pimenta
Location: Barretos / SP

Poston Mon, 21 Nov 2016 6:55 am

Good morning James Works Yes ...

Following, I set up a basic table block in a table called cliente_proprietario and rode a block table base not called control.

In the control block created a field named VALUE and I set up a pre-query client block owner:
Code: Select all
Declare
   v_clau varchar2(2000);
begin
   if :controle.valor is null then
       message('Query full não permitida!');
       pause;
     --
     raise form_trigger_failure;
     --
   else
      if :controle.valor like '%' then
         message('Query com %!');
         pause;
       set_block_property('cliente_proprietario', default_where, 'cliente_proprietario.cd_Clie_Fili like '||''''||:controle.valor||'''');
      else
         message('Query informada!');
         pause;
       set_block_property('cliente_proprietario', default_where, 'cliente_proprietario.cd_Clie_Fili = '||:controle.valor);
      end if;
   end if;
end;
thus he considers properly the%.

see if you can as well.
spernega
Location: São Paulo - SP

Poston Tue, 22 Nov 2016 11:36 am

spernega, First I'm sorry for the delay, I did a simple test forms with non-base-table block and still rolled. Take a look there to see you as I do here, because I'm not riding the default_where, okay?

https://drive.google.com/open?id=0B2SBc ... XU3UFpCS0U [s]
tiago_pimenta
Location: Barretos / SP

Poston Tue, 22 Nov 2016 12:21 pm

James, I was able to download the file but it opens with error, must be missing pll here or something.
I am attaching the test I did and with the script to create a table that I used with some inserts.

Renames the file to .zip and see if you can see the way I did.
Attachments
Temp_Programas.txt
renomear para .zip
(9.01 KiB) Downloaded 87 times
spernega
Location: São Paulo - SP


Previous

Return to Forms

Who is online

Users browsing this forum: No registered users and 6 guests