List block lines with condition applied to the child-child

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
Post Reply
DrJ
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 8
Joined: Tue, 10 Mar 2015 2:01 pm

Dear Experts,


I am new in this forum by what I ask for the V / Understanding. . . . I make self-employed but sometimes I have small developments in various languages, especially forms Builder Oracle.

I looked everywhere and I did not find an answer to my problem that is the following:

in the forms Builder Oracle 9i, I have a form with 2 blocks Master-Detail that works beautifully. The blocks are both basetable being the relationship of type join non-isolated and I intend to list the lines based on a condition applied to the child-child. Example, the Master Block is from football clubs and Detail block is from each club's results. What I want is to present not all lines, but only the lines in which the teams have marked more than 5 goals.

I tried to do without success this way:

Select all

set_block_property('block_clubes', default_where, 'clube_ID in (select clube_id from block_resultados where num_golos>5)'); 
I also tried to apply the set_block_property in the child-child, but then what happens is that I only see the block lines -Fill of that condition without remaking the list of the parent block ... .

Someone has a good tip? Thanks from now on. . .
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

How are you doing the son of the child?
DrJ
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 8
Joined: Tue, 10 Mar 2015 2:01 pm

Hi, Dr_Gori. Since already grateful for the interested interest.

The child block has no condition. What you have here is the parent block in a relation of one for many with the child block. What I want is to be presented the parent block items that in the child block have determined condition.
I was thinking of putting a set_block_property button with default_where, but if you apply defaut_where to the child block, it only affects the child block, so the parent block list does not change, even if it does a clear_block. I do not know if I'm being clear enough. . . . .

J
FernandesRE
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 11
Joined: Thu, 08 Jan 2015 9:22 pm

DRJ,

by the select you posted, gave the impression that you are trying to consult the form block. (from Block_resultados)

If that is, switch to the same table name. (from table results)


User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

It seems to be the same the problem ...
DrJ
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 8
Joined: Tue, 10 Mar 2015 2:01 pm

Hi Fernandesre, I thank you for your interest. . . .

It was really that. THX. Problem solved.
The example I gave was with soccer clubs to facilitate exposure, but in reality, it is a custom document management application, so here goes final solution that works. . . . .

Select all

set_block_property('gpic_pedidos',default_where, 'num_pedido_inf_cli in (select num_pedido_inf_cli from jorge.gpic_envios where num_func_destinatario=:blk_ctrl.num_mec_user)');
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests